@import url('local-fonts.css');
/**
 * article-templates.css
 * Wspólne style komponentów (reakcje, komentarze, modały, lightbox)
 * ze wszystkich 4 szablonów artykułów.
 *
 * Style layoutowe (body, tło, nagłówek, treść) pozostają inline w PHP.
 * Ten plik zawiera TYLKO reużywalne komponenty cross-template.
 */

/* ═══════════════════════════════════════════════════════════════
   GOOGLE FONTS — wszystkie fonty używane przez 4 szablony
   ═══════════════════════════════════════════════════════════════ */
/* @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Lora:ital,wght@0,400;0,700;1,400&display=swap'); — removed, using local-fonts.css instead */
/* @import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap'); — removed, using local-fonts.css instead */
/* @import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&display=swap'); — removed, using local-fonts.css instead */


/* ═══════════════════════════════════════════════════════════════
   ZMIENNE CSS — globalne fallbacki (szablony nadpisują inline)
   ═══════════════════════════════════════════════════════════════ */
:root {
    /* Classic (tpl1) */
    --paper: #f5f0e8;
    --ink: #1a1a1a;
    --ink-light: #4b5563;
    --biedronka-red: #E30613;

    /* Glass (tpl2) */
    --m-bg: #f8fafc;
    --m-text: #0f172a;
    --m-text-light: #64748b;
    --m-brand: #E30613;
    --m-surface: #ffffff;
    --m-border: #e2e8f0;

    /* Industrial (tpl3/4) */
    --b-red: #E30613;
    --b-yellow: #FFD600;
    --b-accent: #ffffff;
    --b-dark: #111111;
    --b-grey: #f3f4f6;
    --b-board: #e7e5e4;
    --font-main: 'Inter', sans-serif;
    --font-display: 'Oswald', sans-serif;
}


/* ═══════════════════════════════════════════════════════════════
   RANK BADGE — badge rangi przy autorze komentarza (wszystkie szablony)
   ═══════════════════════════════════════════════════════════════ */
.comment-rank-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: .65rem;
    font-weight: 600;
    vertical-align: middle;
}
.comment-rank-badge--glass {
    background: #e2e8f0;
    color: #334155;
    padding: 2px 8px;
    font-size: 0.7rem;
}
html.dark .comment-rank-badge {
    background: #374151;
    color: #d1d5db;
}
html.dark .comment-rank-badge--glass {
    background: #1e293b;
    color: #94a3b8;
}


/* ═══════════════════════════════════════════════════════════════
   CLASSIC — Reakcje (z szablonu 1: Gazeta Retro)
   ═══════════════════════════════════════════════════════════════ */
.reactions-bar {
    display: flex;
    justify-content: center;
    gap: .4rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}
.reaction-btn {
    padding: .45rem .85rem;
    border-radius: 99px;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    font-size: .88rem;
    display: flex;
    align-items: center;
    gap: .3rem;
    transition: all .2s;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}
.reaction-btn:hover { border-color: var(--biedronka-red); transform: scale(1.08); }
.reaction-btn.active { border-color: var(--biedronka-red); background: #fef2f2; }
.reaction-btn .count { font-size: .75rem; color: var(--ink-light); }


/* ═══════════════════════════════════════════════════════════════
   GLASS — Reakcje (z szablonu 2: Modern Glass)
   ═══════════════════════════════════════════════════════════════ */
.static-action-center {
    margin: 3rem auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    max-width: fit-content;
}
.m-reaction-btn {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
    color: var(--m-text-light, #64748b);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}
.m-reaction-btn:hover { background: #f1f5f9; transform: scale(1.1); }
.m-reaction-btn.active { color: var(--m-brand, #E30613); background: #fee2e2; }
.m-reaction-btn .count { font-size: 0.85rem; }


/* ═══════════════════════════════════════════════════════════════
   INDUSTRIAL — Reakcje (z szablonów 3 i 4)
   Tpl3 (żółty): --b-yellow aktywny
   Tpl4 (red):   --b-accent aktywny, border-bottom: --b-red
   ═══════════════════════════════════════════════════════════════ */

/* --- Industrial Actions container: Tpl3 (papier z perforacją) --- */
.industrial-actions {
    background-color: #f5eedc;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.03' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E");
    padding: 1.5rem 0 0 0;
    border-top: 2px dashed #a8a29e;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
    position: relative;
}

/* Override: Tpl4 — prostszy boks */
[data-template-id="4"] .industrial-actions,
[data-ratings-style="industrial-red"] .industrial-actions {
    background: var(--b-grey, #f3f4f6);
    background-image: none;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.reaction-row {
    display: flex;
    gap: 0;
    border-top: 2px dashed #8b8581;
    margin-top: 1.5rem;
    width: 100%;
}

/* Override: Tpl4 reaction-row — prostszy flex */
[data-template-id="4"] .reaction-row,
[data-ratings-style="industrial-red"] .reaction-row {
    border-top: none;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0;
    width: auto;
}

/* --- Tpl3: Pionowe paski odrywane (domyślny industrial-btn) --- */
.industrial-btn {
    flex: 1;
    height: 220px;
    background: transparent;
    border: none;
    border-right: 2px dashed #8b8581;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    transform: none;
    padding: 15px 5px;
    color: var(--b-dark, #111);
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    position: relative;
}
.industrial-btn .bi {
    transform: rotate(90deg);
    display: inline-flex;
    flex-shrink: 0;
}
.industrial-btn:first-child { border-left: 2px dashed #8b8581; }
.industrial-btn:hover {
    background: rgba(0,0,0,0.05);
    height: 200px;
    transform: none;
    box-shadow: 0 -5px 10px rgba(0,0,0,0.1);
}
.industrial-btn:active, .industrial-btn.active {
    background: var(--b-yellow, #FFD600);
    height: 210px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
    color: #000;
}

/* --- Tpl4: Płaskie buttony z cieniem (override industrial-btn) --- */
[data-template-id="4"] .industrial-btn,
[data-ratings-style="industrial-red"] .industrial-btn {
    flex: unset;
    height: auto;
    writing-mode: horizontal-tb;
    transform: none;
    border: 3px solid var(--b-dark, #111);
    border-right: 3px solid var(--b-dark, #111);
    background: #fff;
    padding: 8px 16px;
    font-size: 1rem;
    box-shadow: 4px 4px 0 #111;
}
[data-template-id="4"] .industrial-btn:first-child,
[data-ratings-style="industrial-red"] .industrial-btn:first-child {
    border-left: 3px solid var(--b-dark, #111);
}
[data-template-id="4"] .industrial-btn:hover,
[data-ratings-style="industrial-red"] .industrial-btn:hover {
    height: auto;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #111;
    background: rgba(0,0,0,0.05);
}
[data-template-id="4"] .industrial-btn:active,
[data-template-id="4"] .industrial-btn.active,
[data-ratings-style="industrial-red"] .industrial-btn:active,
[data-ratings-style="industrial-red"] .industrial-btn.active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 #111;
    background: var(--b-dark, #111);
    color: var(--b-accent, #fff);
    height: auto;
}


/* ═══════════════════════════════════════════════════════════════
   CLASSIC — Komentarze (z szablonu 1: Gazeta Retro)
   ═══════════════════════════════════════════════════════════════ */
.comments-section { margin-top: 2rem; }
.comments-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--biedronka-red, #E30613);
}
.comment-form {
    margin-bottom: 1.5rem;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.comment-form textarea {
    width: 100%;
    padding: .75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'Lora', serif;
    font-size: .9rem;
    resize: vertical;
    min-height: 80px;
    outline: none;
}
.comment-form textarea:focus { border-color: var(--biedronka-red, #E30613); }
.comment-form button {
    margin-top: .5rem;
    background: var(--biedronka-red, #E30613);
    color: white;
    padding: .55rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: .82rem;
}

.comment-item {
    padding: .85rem 0;
    border-bottom: 1px solid #f0ece0;
}
.comment-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .3rem;
    font-family: 'Inter', sans-serif;
    font-size: .8rem;
}
.comment-author { font-weight: 700; color: var(--ink, #1a1a1a); }
.comment-time { color: var(--ink-light, #4b5563); font-size: .72rem; }
.comment-body { font-size: .9rem; line-height: 1.6; color: var(--ink, #1a1a1a); }
.comment-actions { margin-top: .3rem; font-family: 'Inter', sans-serif; font-size: .72rem; }
.comment-actions button, .comment-actions a {
    background: none; border: none; color: var(--ink-light, #4b5563); cursor: pointer;
    text-decoration: none; font-size: .72rem; margin-right: .75rem;
}
.comment-actions button:hover, .comment-actions a:hover { color: var(--biedronka-red, #E30613); }

.comment-reply { margin-left: 1.5rem; border-left: 2px solid #e5e7eb; padding-left: 1rem; }
@media (max-width: 768px) { .comment-reply { margin-left: .75rem; padding-left: .75rem; } }

.comment-empty {
    text-align: center;
    padding: 1.5rem;
    color: var(--ink-light, #4b5563);
    font-style: italic;
}


/* ═══════════════════════════════════════════════════════════════
   GLASS — Komentarze (z szablonu 2: Modern Glass)
   ═══════════════════════════════════════════════════════════════ */
.m-comments-section { margin-top: 5rem; }
.m-comments-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.m-comment-form {
    background: var(--m-surface, #fff);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid var(--m-border, #e2e8f0);
    margin-bottom: 3rem;
}
.m-comment-form textarea {
    width: 100%;
    background: var(--m-bg, #f8fafc);
    border: 1px solid var(--m-border, #e2e8f0);
    padding: 1rem;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    min-height: 100px;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.m-comment-form textarea:focus { border-color: var(--m-brand, #E30613); box-shadow: 0 0 0 4px rgba(227,6,19,0.1); }
.btn-modern {
    background: var(--m-brand, #E30613);
    color: #fff;
    border: none;
    padding: 0.7rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 15px rgba(227,6,19,0.2);
    margin-top: 1rem;
}
.btn-modern:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(227,6,19,0.3); }

.m-comment-card {
    background: var(--m-surface, #fff);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    border: 1px solid var(--m-border, #e2e8f0);
    transition: transform 0.2s;
}
.m-comment-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.05); }
.m-comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.m-comment-avatar {
    width: 44px; height: 44px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.m-comment-author { font-weight: 700; font-family: 'Outfit', sans-serif; color: var(--m-text, #0f172a); font-size: 1.05rem; }
.m-comment-time { color: var(--m-text-light, #64748b); font-size: .8rem; }
.m-comment-body { color: #334155; line-height: 1.6; }

.m-comment-actions { margin-top: 1rem; display: flex; gap: 1rem; }
.m-btn-text {
    background: none; border: none; font-size: .85rem; color: var(--m-text-light, #64748b); font-weight: 600; cursor: pointer; transition: color 0.2s;
}
.m-btn-text:hover { color: var(--m-brand, #E30613); }

.m-replies { margin-left: 3rem; margin-top: 1.5rem; border-left: 2px dashed var(--m-border, #e2e8f0); padding-left: 1.5rem; }
@media (max-width: 768px) { .m-replies { margin-left: 1rem; padding-left: 1rem; } }


/* ═══════════════════════════════════════════════════════════════
   INDUSTRIAL — Komentarze (Receipt/Paragon, z szablonów 3 i 4)
   ═══════════════════════════════════════════════════════════════ */
.receipt-container {
    max-width: 600px;
    margin: 0 auto 4rem;
    background: #fff;
    padding: 2rem 2rem 4rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    mask-image: radial-gradient(circle at 10px 100%, transparent 10px, black 11px);
    mask-size: 20px 100%;
    mask-repeat: repeat-x;
    mask-position: bottom;
    -webkit-mask-image: radial-gradient(circle at 10px 100%, transparent 10px, black 11px);
    -webkit-mask-size: 20px 100%;
    -webkit-mask-repeat: repeat-x;
    -webkit-mask-position: bottom;
    position: relative;
    border: 1px solid #e5e5e5;
    font-family: 'Courier New', Courier, monospace;
}
.receipt-header {
    text-align: center;
    border-bottom: 2px dashed #000;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}
.receipt-header h2 { font-family: 'Oswald', sans-serif; font-size: 2rem; color: #000; letter-spacing: 2px; }
.receipt-header p { font-size: 0.9rem; font-weight: bold; }

.receipt-form { border-bottom: 2px dashed #000; padding-bottom: 2rem; margin-bottom: 2rem; }
.receipt-form textarea {
    width: 100%;
    border: 2px solid #000;
    background: #fafafa;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    min-height: 80px;
    resize: vertical;
    outline: none;
}
.receipt-form textarea:focus { background: #fff; border-color: var(--b-red, #E30613); }
.btn-receipt {
    margin-top: 10px;
    background: black;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
}
.btn-receipt:hover { background: var(--b-red, #E30613); }

.r-comment { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px dotted #ccc; }
.r-employee-badge {
    background: var(--b-red, #E30613);
    color: white;
    font-family: 'Inter', sans-serif;
    padding: 4px 10px;
    font-weight: 700;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 4px;
    margin-bottom: 8px;
}
.r-employee-badge img { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #fff; }

/* Override: Tpl4 — czarny badge zamiast czerwonego */
[data-template-id="4"] .r-employee-badge,
[data-comments-style="industrial"] .r-employee-badge {
    /* Zachowaj domyślny (czerwony) — tpl4 w oryginale ma --b-dark */
}

.r-text { font-size: 1.05rem; line-height: 1.4; color: #111; font-weight: bold; margin-bottom: .5rem; }
.r-meta { font-size: 0.8rem; color: #666; display: flex; gap: 10px; font-family: 'Inter', sans-serif; }
.r-actions button { background: none; border: none; font-family: 'Inter', sans-serif; font-weight: bold; cursor: pointer; color: #000; text-decoration: underline; font-size: .8rem; margin-right: 10px; }
.r-actions button:hover { color: var(--b-red, #E30613); }

.r-reply { margin-left: 2rem; border-left: 4px solid var(--b-yellow, #FFD600); padding-left: 1rem; margin-top: 1rem; }

/* Override: Tpl4 — ciemna ramka reply */
[data-template-id="4"] .r-reply {
    border-left-color: var(--b-dark, #111);
}


/* ═══════════════════════════════════════════════════════════════
   LOADING — style ładowania (per szablon)
   ═══════════════════════════════════════════════════════════════ */
.article-loading {
    text-align: center;
    padding: 3rem;
    color: var(--ink-light, #4b5563);
    font-style: italic;
}
.loading {
    text-align: center;
    padding: 4rem;
    font-size: 1.2rem;
    color: var(--m-text-light, #64748b);
    font-weight: 600;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* Override loading dla Industrial */
[data-template-id="3"] .loading,
[data-template-id="4"] .loading {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
    animation: none;
}


/* ═══════════════════════════════════════════════════════════════
   REPORT MODAL — warianty per szablon
   ═══════════════════════════════════════════════════════════════ */
.report-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
    align-items: center;
    justify-content: center;
}
.report-modal-overlay.active { display: flex; }

.report-modal {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.report-modal h3 { font-family: 'Inter', sans-serif; font-size: 1rem; margin-bottom: .75rem; }
.report-modal textarea {
    width: 100%; padding: .6rem; border: 1px solid #d1d5db; border-radius: 6px;
    font-size: .85rem; min-height: 80px; outline: none; resize: vertical;
}
.report-modal .modal-actions { display: flex; gap: .5rem; margin-top: .75rem; justify-content: flex-end; }
.report-modal .modal-actions button {
    padding: .45rem 1rem; border-radius: 6px; font-weight: 600; font-size: .82rem; cursor: pointer; border: none;
}
.report-modal .btn-cancel { background: #f3f4f6; color: #374151; }
.report-modal .btn-report { background: var(--biedronka-red, #E30613); color: white; }

/* Override: Glass modal */
[data-template-id="2"] .report-modal {
    border-radius: 24px;
    padding: 2rem;
    border: none;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

/* Override: Industrial modal */
[data-template-id="3"] .report-modal,
[data-template-id="4"] .report-modal {
    border-radius: 0;
    border: 4px solid #000;
    box-shadow: 10px 10px 0 var(--b-red, #E30613);
}


/* ═══════════════════════════════════════════════════════════════
   LIGHTBOX — wspólny z wariantami per szablon
   ═══════════════════════════════════════════════════════════════ */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s ease;
    cursor: zoom-out;
}
.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}
.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,.5);
    object-fit: contain;
    user-select: none;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10001;
    transition: color .2s;
}
.lightbox-close:hover { color: var(--biedronka-red, #E30613); }

/* Override: Glass lightbox */
[data-template-id="2"] .lightbox-overlay {
    background: rgba(15,23,42,0.95);
    backdrop-filter: blur(10px);
}
[data-template-id="2"] .lightbox-img { border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
[data-template-id="2"] .lightbox-close {
    top: 30px; right: 40px;
    background: rgba(255,255,255,0.1);
    width: 50px; height: 50px; border-radius: 50%;
    font-size: 1.5rem;
    backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center;
}
[data-template-id="2"] .lightbox-close:hover { background: var(--m-brand, #E30613); transform: rotate(90deg); }

/* Override: Industrial lightbox */
[data-template-id="3"] .lightbox-img,
[data-template-id="4"] .lightbox-img {
    border-radius: 0;
    border: 5px solid var(--b-yellow, #FFD600);
    box-shadow: none;
}
[data-template-id="4"] .lightbox-img {
    border-color: var(--b-red, #E30613);
}
[data-template-id="3"] .lightbox-close,
[data-template-id="4"] .lightbox-close {
    background: var(--b-red, #E30613);
    color: white;
    padding: 10px 20px;
    font-family: 'Oswald', sans-serif;
    border-radius: 0;
}

/* Cursor zoom-in na obrazach w artykule */
.article-content img, .article-hero-img,
.m-article-body img,
.shop-content img { cursor: zoom-in; }

/* ═══════════════════════════════════════════════════════════════
   DARK MODE — całościowe nadpisania dla wszystkich szablonów
   ═══════════════════════════════════════════════════════════════ */

/* -- Classic (tpl1) -- */
html.dark .reactions-bar { background: transparent; }
html.dark .reaction-btn {
    background: #1f2937;
    border-color: #4b5563;
    color: #e5e7eb;
}
html.dark .reaction-btn:hover { border-color: #E30613; background: #2d1a1d; }
html.dark .reaction-btn.active { background: #3b0a0d; border-color: #E30613; color: #fca5a5; }
html.dark .reaction-btn .count { color: #9ca3af; }

/* -- Glass (tpl2) -- */
html.dark .m-reaction-btn { color: #94a3b8; }
html.dark .m-reaction-btn:hover { background: #1e293b; }
html.dark .m-reaction-btn.active { color: #f87171; background: #1e293b; }
html.dark .static-action-center {
    background: rgba(30,41,59,0.9);
    border-color: rgba(255,255,255,0.08);
}

/* -- Industrial (tpl3/4) — reaction-row -- */
html.dark .reaction-row {
    border-color: #57534e;
}
html.dark .industrial-actions {
    background-color: #292524 !important;
    background-image: none !important;
    border-color: #57534e;
}
html.dark .industrial-btn {
    color: #fef3c7;
    border-color: #57534e;
}
html.dark .industrial-btn:hover {
    background: rgba(255,255,255,0.07);
}
html.dark .industrial-btn.active {
    background: rgba(255,214,0,0.2);
    color: #fef3c7;
}
html.dark [data-template-id="4"] .industrial-btn {
    background: #1c1917;
    border-color: #57534e;
    color: #e7e5e4;
    box-shadow: 4px 4px 0 #000;
}
html.dark [data-template-id="4"] .industrial-btn:hover {
    background: #292524;
}

/* -- r-actions (tekst w komentarzach industrial) -- */
html.dark .r-text { color: #e7e5e4; }
html.dark .r-meta { color: #a8a29e; }
html.dark .r-actions button {
    color: #d6d3d1 !important;
}
html.dark .r-actions button:hover {
    color: var(--b-red, #E30613) !important;
}
html.dark .r-comment { border-color: #57534e; }
html.dark .r-reply {
    border-left-color: rgba(255,214,0,0.5);
}
html.dark [data-template-id="4"] .r-reply {
    border-left-color: #57534e;
}

/* -- receipt comments -- */
html.dark .receipt-container {
    background: #1c1917;
    color: #e7e5e4;
    border-color: #57534e;
}
html.dark .receipt-header { border-color: #78716c; }
html.dark .receipt-header h2 { color: #f5f5f4; }
html.dark .receipt-form textarea {
    background: #292524;
    border-color: #78716c;
    color: #e7e5e4;
}
html.dark .btn-receipt {
    background: #374151;
    color: #e7e5e4;
}
html.dark .btn-receipt:hover { background: var(--b-red, #E30613); }
html.dark .r-employee-badge { opacity: .9; }

/* ── Dark mode: News Poll Container ── */
html.dark [data-template-id="1"] #newsPollContainer [id^="newsPollCard_"],
html.dark [data-template-id="1"] #newsPollContainer [id^="newsPollCard_"] > div {
    background: #2a2520 !important;
    border-color: #8b6914 !important;
    color: #e2e8f0 !important;
}

html.dark [data-template-id="2"] #newsPollContainer [id^="newsPollCard_"] {
    background: rgba(30,30,40,0.85) !important;
    border-color: rgba(255,255,255,0.1) !important;
    color: #e2e8f0 !important;
}

html.dark [data-template-id="3"] #newsPollContainer [id^="newsPollCard_"] {
    background: #1c1917 !important;
    border-color: #f59e0b !important;
    color: #e2e8f0 !important;
}

html.dark [data-template-id="4"] #newsPollContainer [id^="newsPollCard_"] {
    background: #1a1a1a !important;
    border-color: #E30613 !important;
    color: #e2e8f0 !important;
}

html.dark #newsPollContainer label {
    color: #cbd5e1 !important;
}
html.dark #newsPollContainer label:hover {
    opacity: 0.9;
}
html.dark #newsPollContainer input[type="radio"],
html.dark #newsPollContainer input[type="checkbox"] {
    accent-color: #E30613;
}
html.dark #newsPollContainer p,
html.dark #newsPollContainer span {
    color: #94a3b8;
}
html.dark #newsPollContainer div[style*="background:#e5e7eb"] {
    background: #374151 !important;
}
/* Wymuś jasny kolor dla głównych tytułów ankiety i sekcji */
html.dark #newsPollContainer [id^="newsPollCard_"] > div:nth-child(3),
html.dark #newsPollContainer [id^="newsPollCard_"] > div:nth-child(1) {
    color: #f8fafc !important; 
}
html.dark [data-template-id="3"] #newsPollContainer [id^="newsPollCard_"] > div:nth-child(1),
html.dark [data-template-id="4"] #newsPollContainer [id^="newsPollCard_"] > div:nth-child(1) {
    color: #fcd34d !important;
}
/* Usunięcie dziedziczenia ciemnego tła z nagłówków w stylach 1/2 */
html.dark [data-template-id="1"] #newsPollContainer [id^="newsPollCard_"] > div,
html.dark [data-template-id="2"] #newsPollContainer [id^="newsPollCard_"] > div {
    background: transparent !important;
}

/* ── Dark mode: Glass — replies border + meta ── */
html.dark .m-replies {
    border-left-color: #334155;
}
html.dark .m-comment-time {
    color: #94a3b8;
}
html.dark .m-btn-text {
    color: #94a3b8;
}

/* ── Dark mode: Classic — comment-form non-logged text ── */
html.dark .comment-form {
    color: #9ca3af !important;
}
