/* ============================================================
   JOHANNA NORDSTRØM - CUSTOM CSS
   Lekfull och färgglad känsla med flera accentfärger
   Integrerad i Johanna – vardagsjournal. Ingen separat inklistring behövs.
   Bearbetad: bättre kontrast, meningsfall, nästlade listor och tillgängliga tabellkort.
   ============================================================ */

/* === FÄRGPALETT (referens) ===
   Amber:    #9c4925 (varm orange, EEAT-färg)
   Korall:   #b8562a (lekfull orange)
   Rosa:     #ec4899 (accent för citat och kärleksämnen)
   Petrol:   #453126 (mörkblå, headers)
   Gröngrå:  #34d399 (tipsbox)
   Limegul:  #f4d35e (accent för positivt)
   Tegelröd: #c0392b (varning)
   Skifferblå:#3b82f6 (info)
   ============================================================ */


/* ===== TL;DR-BOX (används normalt INTE på Johannas blogg) ===== */
.entry-content .tldr-box {
    background: linear-gradient(135deg, #fef9f3 0%, #fff5e6 100%);
    border-left: 5px solid #9c4925;
    border-radius: 8px;
    padding: 22px 26px;
    margin: 28px 0;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.08);
    font-size: 16px;
    line-height: 1.7;
    color: #44403c;
    position: relative;
}
.entry-content .tldr-box strong:first-child {
    color: #9c4925;
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}


/* ===== SNABBFAKTA-BOX ===== */
.entry-content .snabbfakta-box {
    background: #f0f9ff;
    border: 2px solid #3b82f6;
    border-radius: 10px;
    padding: 22px 26px;
    margin: 28px 0;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}
.entry-content .snabbfakta-box strong:first-child {
    color: #1e40af;
    font-size: 17px;
    display: block;
    margin-bottom: 12px;
}
.entry-content .snabbfakta-box ul {
    margin: 0;
    padding-left: 22px;
    list-style: none;
}
.entry-content .snabbfakta-box li {
    padding: 5px 0;
    position: relative;
}
.entry-content .snabbfakta-box li::before {
    content: "✓";
    color: #3b82f6;
    font-weight: bold;
    position: absolute;
    left: -22px;
    font-size: 16px;
}


/* ===== TIPS-BOX ===== */
.entry-content .tips-box {
    background: #ecfdf5;
    border-left: 5px solid #34d399;
    border-radius: 8px;
    padding: 18px 24px;
    margin: 24px 0;
    color: #065f46;
    box-shadow: 0 2px 6px rgba(52, 211, 153, 0.1);
    position: relative;
    padding-left: 60px;
}
.entry-content .tips-box::before {
    content: "💡";
    position: absolute;
    left: 22px;
    top: 18px;
    font-size: 22px;
}
.entry-content .tips-box strong:first-child {
    color: #047857;
    text-transform: none;
    font-size: 13px;
    letter-spacing: 0.5px;
}


/* ===== INFO-BOX ===== */
.entry-content .info-box {
    background: #faf5ff;
    border-left: 5px solid #a855f7;
    border-radius: 8px;
    padding: 18px 24px;
    margin: 24px 0;
    color: #581c87;
    box-shadow: 0 2px 6px rgba(168, 85, 247, 0.1);
    position: relative;
    padding-left: 60px;
}
.entry-content .info-box::before {
    content: "ℹ️";
    position: absolute;
    left: 22px;
    top: 18px;
    font-size: 22px;
}
.entry-content .info-box strong:first-child {
    color: #7e22ce;
    text-transform: none;
    font-size: 13px;
    letter-spacing: 0.5px;
}


/* ===== VARNING-BOX ===== */
.entry-content .varning-box {
    background: #fef2f2;
    border-left: 5px solid #c0392b;
    border-radius: 8px;
    padding: 18px 24px;
    margin: 24px 0;
    color: #991b1b;
    box-shadow: 0 2px 6px rgba(192, 57, 43, 0.1);
    position: relative;
    padding-left: 60px;
}
.entry-content .varning-box::before {
    content: "⚠️";
    position: absolute;
    left: 22px;
    top: 18px;
    font-size: 22px;
}
.entry-content .varning-box strong:first-child {
    color: #c0392b;
    text-transform: none;
    font-size: 13px;
    letter-spacing: 0.5px;
}


/* ===== CITAT-BOX ===== */
.entry-content .citat-box,
.entry-content blockquote.citat-box {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border: none;
    border-left: 5px solid #ec4899;
    border-radius: 8px;
    padding: 24px 28px 24px 70px;
    margin: 28px 0;
    font-style: italic;
    color: #500724;
    position: relative;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.1);
}
.entry-content .citat-box::before {
    content: '"';
    position: absolute;
    left: 18px;
    top: -8px;
    font-size: 64px;
    color: #ec4899;
    font-family: Georgia, serif;
    line-height: 1;
    font-style: normal;
}
.entry-content .citat-box p {
    margin: 0 0 8px;
    font-size: 17px;
}
.entry-content .citat-box cite {
    color: #be185d;
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
}


/* ===== PROS/CONS-BOX ===== */
.entry-content .proscons-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 28px 0;
}
.entry-content .proscons-box .pros,
.entry-content .proscons-box .cons {
    padding: 20px 22px;
    border-radius: 8px;
}
.entry-content .proscons-box .pros {
    background: #ecfdf5;
    border: 2px solid #34d399;
}
.entry-content .proscons-box .cons {
    background: #fef2f2;
    border: 2px solid #f87171;
}
.entry-content .proscons-box .pros strong {
    color: #047857;
    font-size: 16px;
    text-transform: none;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 10px;
}
.entry-content .proscons-box .cons strong {
    color: #b91c1c;
    font-size: 16px;
    text-transform: none;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 10px;
}
.entry-content .proscons-box ul {
    margin: 0;
    padding-left: 22px;
}
.entry-content .proscons-box li {
    padding: 4px 0;
}
@media (max-width: 600px) {
    .entry-content .proscons-box {
        grid-template-columns: 1fr;
    }
}


/* ===== STEG-FÖR-STEG ===== */
.entry-content ol.steg-for-steg {
    counter-reset: steg;
    list-style: none;
    padding-left: 0;
    margin: 28px 0;
}
.entry-content ol.steg-for-steg > li {
    counter-increment: steg;
    background: #fef9f3;
    border-left: 5px solid #b8562a;
    border-radius: 8px;
    padding: 16px 20px 16px 70px;
    margin-bottom: 14px;
    position: relative;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.08);
}
.entry-content ol.steg-for-steg > li::before {
    content: counter(steg);
    position: absolute;
    left: 18px;
    top: 14px;
    background: #b8562a;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);
}


/* ===== INTERNLÄNKSBOX ===== */
.entry-content .internlankar-box {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px dashed #34d399;
    border-radius: 10px;
    padding: 22px 26px;
    margin: 32px 0;
    box-shadow: 0 2px 8px rgba(52, 211, 153, 0.08);
}
.entry-content .internlankar-box strong:first-child {
    color: #047857;
    font-size: 16px;
    text-transform: none;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 12px;
}
.entry-content .internlankar-box ul {
    margin: 0;
    padding-left: 22px;
    list-style: none;
}
.entry-content .internlankar-box li {
    padding: 5px 0;
    position: relative;
}
.entry-content .internlankar-box li::before {
    content: "→";
    color: #34d399;
    font-weight: bold;
    position: absolute;
    left: -22px;
}
.entry-content .internlankar-box a {
    color: #047857;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.entry-content .internlankar-box a:hover {
    border-bottom-color: #047857;
}


/* ===== LÄNKAR I LÖPTEXT ===== */
.entry-content p a,
.entry-content li a {
    color: #9c4925;
    text-decoration: none;
    border-bottom: 2px solid rgba(217, 119, 6, 0.3);
    transition: border-color 0.2s, color 0.2s;
    padding-bottom: 1px;
}
.entry-content p a:hover,
.entry-content li a:hover {
    color: #b45309;
    border-bottom-color: #9c4925;
}


/* Article headings follow the journal typography. */
.entry-content h2 { color: #453126; margin: 1.6em 0 .65em; font-weight: 400; padding: 0; }
.entry-content h3 { color: #453126; margin: 1.35em 0 .65em; font-weight: 400; }

/* Native markers preserve nested lists, start/reversed and numbering. */
.entry-content > ul, .entry-content > ol:not(.steg-for-steg) { margin: 20px 0; padding-left: 1.5em; }
.entry-content > ul > li, .entry-content > ol:not(.steg-for-steg) > li { padding-left: .3em; margin-bottom: 10px; }
.entry-content li::marker { color: #9c4925; font-weight: 600; }
.entry-content ul ul, .entry-content ol ol { margin: 10px 0; }

/* ============================================================
   RESPONSIVE-TABLE
   Hög specificitet med trippelklass + !important för att slå
   tema-CSS som annars dödar thead-färgning på Johannas tema.
   ============================================================ */
.entry-content.entry-content.entry-content table.responsive-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 24px 0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 12px rgba(15, 30, 46, 0.1) !important;
    font-size: 15px !important;
    border: 1px solid #e5e7eb !important;
}

.entry-content.entry-content.entry-content table.responsive-table thead {
    background: linear-gradient(135deg, #9c4925 0%, #b45309 100%) !important;
}

.entry-content.entry-content.entry-content table.responsive-table thead tr {
    background: transparent !important;
}

.entry-content.entry-content.entry-content table.responsive-table thead th {
    background: transparent !important;
    color: #fff !important;
    padding: 14px 16px !important;
    text-align: left !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: none !important;
    letter-spacing: 0.5px !important;
    border: none !important;
}

.entry-content.entry-content.entry-content table.responsive-table tbody tr {
    background: #fff !important;
    transition: background 0.2s !important;
}

.entry-content.entry-content.entry-content table.responsive-table tbody tr:nth-child(even) {
    background: #fef9f3 !important;
}

.entry-content.entry-content.entry-content table.responsive-table tbody tr:hover {
    background: #fef3c7 !important;
}

.entry-content.entry-content.entry-content table.responsive-table tbody td {
    padding: 14px 16px !important;
    border: none !important;
    border-top: 1px solid #f3f4f6 !important;
    color: #1f2937 !important;
    vertical-align: top !important;
    line-height: 1.5 !important;
}

.entry-content.entry-content.entry-content table.responsive-table tbody td:first-child {
    font-weight: 600 !important;
    color: #453126 !important;
}

/* Card enhancement is enabled only when a simple table has usable headers.
   Complex tables and no-JS browsers keep their columns and can scroll. */
.entry-content table { display: block; max-width: 100%; overflow-x: auto; }
.jnv-table-scroll { max-width: 100%; overflow-x: auto; margin: 24px 0; }
.entry-content .jnv-table-scroll > table { display: table; margin: 0 !important; }
.jnv-cell-label { display: none; }
@media (max-width: 600px) {
    .entry-content.entry-content.entry-content table.responsive-table.jnv-table-cards {
        display: block; border: none !important; box-shadow: none !important; background: transparent !important; overflow: visible !important;
    }
    .entry-content table.jnv-table-cards thead {
        position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
        overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap;
    }
    .entry-content table.jnv-table-cards caption { display: block; width: 100%; max-width: none; text-align: left; padding: 0 0 12px; font-size: 14px; }
    .entry-content table.jnv-table-cards tbody { display: block; }
    .entry-content.entry-content.entry-content table.jnv-table-cards tbody tr {
        display: block; background: #fff !important; border: 1px solid #dacbc0 !important;
        border-top: 3px solid #9c4925 !important; border-radius: 3px; margin-bottom: 16px; padding: 14px 18px;
    }
    .entry-content.entry-content.entry-content table.jnv-table-cards tbody td,
    .entry-content.entry-content.entry-content table.jnv-table-cards tbody th {
        display: block; padding: 7px 0 !important; border: none !important; text-align: left; overflow-wrap: anywhere;
    }
    .entry-content table.jnv-table-cards .jnv-cell-label {
        display: block; font-size: 12px; font-weight: 600; line-height: 1.5; color: #9c4925; margin-bottom: 2px;
    }
}

/* ===== FAQ-SEKTION ===== */
.entry-content h2:has(+ p strong:first-child),
.entry-content h2 + p strong:first-child {
    color: #453126;
}
.entry-content p strong:first-child:only-child,
.entry-content p > strong:first-child {
    color: #9c4925;
}

/* Säkerställer att alla FAQ-frågor har exakt samma färg, även om
   ez-toc, Yoast, Rank Math eller temat färglägger någon annorlunda */
.entry-content p strong:first-child,
.entry-content p strong:first-child a,
.entry-content p strong:first-child span {
    color: #9c4925 !important;
    font-weight: 700;
}


/* ===== INLINE STRONG/HIGHLIGHT ===== */
.entry-content p strong {
    color: #453126;
}


/* ===== UNDERSTRYK FÖRSTA STYCKET LÄTT ===== */
.entry-content > p:first-of-type {
    font-size: 17px;
    line-height: 1.75;
    color: #44403c;
}


/* ===== JN UPPDATERAD-NOTIS (från EEAT-plugin) ===== */
.entry-content .jn-updated-notice {
    background: linear-gradient(135deg, #fef9f3 0%, #fef3c7 100%) !important;
    border-left: 5px solid #9c4925 !important;
    border-radius: 6px !important;
    padding: 14px 18px !important;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.08);
}

/* Quiet surfaces; all original class names remain supported. */
.entry-content :is(.tldr-box,.snabbfakta-box,.tips-box,.info-box,.varning-box,.citat-box,.internlankar-box) { border-radius: 3px; box-shadow: none; font-size: 16px; line-height: 1.8; }
.entry-content :is(.tldr-box,.snabbfakta-box,.tips-box,.info-box,.varning-box,.citat-box,.internlankar-box) > :last-child { margin-bottom: 0; }
.entry-content :is(.tldr-box,.snabbfakta-box,.tips-box,.info-box,.varning-box,.citat-box,.internlankar-box) > :first-child { margin-top: 0; }
.entry-content .proscons-box { min-width: 0; }
.entry-content .proscons-box > div { min-width: 0; }
.entry-content p a, .entry-content li a { text-decoration: underline; text-underline-offset: .2em; border-bottom: 0; }
.entry-content .snabbfakta-box li::marker, .entry-content .internlankar-box li::marker { content: ''; }
.entry-content ol.steg-for-steg > li::before { top: 17px; }
.entry-content .jn-updated-notice { box-shadow: none; }
.entry-content > p:first-of-type { font-size: 1.1em; line-height: 1.8; }
@media(max-width:600px){
  .entry-content :is(.tldr-box,.snabbfakta-box,.internlankar-box) { padding: 19px; }
  .entry-content :is(.tips-box,.info-box,.varning-box) { padding: 18px 18px 18px 53px; }
  .entry-content :is(.tips-box,.info-box,.varning-box)::before { left: 15px; }
  .entry-content .citat-box { padding: 22px 20px 22px 48px; }
  .entry-content .citat-box::before { left: 12px; }
}
