/* ===========================
   Simple Cookie Consent CSS
   =========================== */

/* Overlay — μόνο για popup κεντρικό */
#scc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99998;
}
#scc-overlay.active { display: block; }

/* ===========================
   Base Banner
   =========================== */
#scc-banner {
    position: fixed;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── Popup κεντρικό ── */
#scc-banner.scc-popup {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 620px;
    border-radius: 4px;
    padding: 32px 28px 24px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.18);
}
#scc-banner.scc-popup.scc-hidden {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.97);
    pointer-events: none;
}

/* ── Corner popups (κάτω/πάνω αριστερά/δεξιά) ── */
#scc-banner.scc-bottom-left,
#scc-banner.scc-bottom-right,
#scc-banner.scc-top-left,
#scc-banner.scc-top-right {
    width: 480px;
    max-width: calc(100vw - 32px);
    border-radius: 6px;
    padding: 24px 22px 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.16);
}

#scc-banner.scc-bottom-left  { bottom: 16px; left: 16px; }
#scc-banner.scc-bottom-right { bottom: 16px; right: 16px; }
#scc-banner.scc-top-left     { top: 16px;    left: 16px; }
#scc-banner.scc-top-right    { top: 16px;    right: 16px; }

#scc-banner.scc-bottom-left.scc-hidden,
#scc-banner.scc-bottom-right.scc-hidden {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}
#scc-banner.scc-top-left.scc-hidden,
#scc-banner.scc-top-right.scc-hidden {
    opacity: 0;
    transform: translateY(-16px);
    pointer-events: none;
}

/* ── Full-width bars ── */
#scc-banner.scc-bottom-bar {
    bottom: 0; left: 0; right: 0;
    padding: 18px 28px;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
#scc-banner.scc-bottom-bar.scc-hidden {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

#scc-banner.scc-top-bar {
    top: 0; left: 0; right: 0;
    padding: 18px 28px;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
#scc-banner.scc-top-bar.scc-hidden {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

/* Bar-mode: κρύβουμε τίτλο, links, X */
#scc-banner.scc-bottom-bar #scc-title,
#scc-banner.scc-top-bar    #scc-title,
#scc-banner.scc-bottom-bar #scc-links,
#scc-banner.scc-top-bar    #scc-links,
#scc-banner.scc-bottom-bar #scc-close,
#scc-banner.scc-top-bar    #scc-close { display: none !important; }

#scc-banner.scc-bottom-bar #scc-text,
#scc-banner.scc-top-bar    #scc-text {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}
#scc-banner.scc-bottom-bar #scc-buttons,
#scc-banner.scc-top-bar    #scc-buttons {
    margin-bottom: 0;
    flex-shrink: 0;
}

/* ===========================
   Close button (X)
   =========================== */
#scc-close {
    display: none;
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 4px 6px;
}
#scc-close:hover { color: #111; }

/* Εμφάνιση X σε popup και corner */
#scc-banner.scc-popup       #scc-close,
#scc-banner.scc-bottom-left  #scc-close,
#scc-banner.scc-bottom-right #scc-close,
#scc-banner.scc-top-left     #scc-close,
#scc-banner.scc-top-right    #scc-close { display: block; }

/* ===========================
   Title / Text / Buttons / Links
   =========================== */
#scc-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px;
    padding-right: 24px;
    text-align: center;
}

#scc-text {
    margin-bottom: 18px;
    font-size: 13.5px;
}
#scc-text a { color: inherit; text-decoration: underline; }

#scc-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
    margin-bottom: 14px;
}

.scc-btn {
    padding: 9px 14px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: opacity 0.15s, background 0.15s;
    white-space: nowrap;
    border: none;
    letter-spacing: 0.01em;
    flex: 1;
    text-align: center;
}

.scc-btn:hover { opacity: 0.88; }

#scc-btn-accept {
    background: #8a7a4a;
    color: #fff;
}
#scc-btn-reject {
    background: transparent;
    color: inherit;
    border: 1px solid currentColor;
    opacity: 0.8;
}
#scc-btn-reject:hover  { opacity: 1; background: rgba(128,128,128,0.15); }
#scc-btn-settings {
    background: transparent;
    color: inherit;
    border: 1px solid currentColor;
    opacity: 0.8;
}
#scc-btn-settings:hover { opacity: 1; background: rgba(128,128,128,0.15); }

/* Corner mode: κουμπιά πάντα σε σειρά */
#scc-banner.scc-bottom-left  #scc-buttons,
#scc-banner.scc-bottom-right #scc-buttons,
#scc-banner.scc-top-left     #scc-buttons,
#scc-banner.scc-top-right    #scc-buttons {
    flex-direction: row;
    flex-wrap: nowrap;
}
#scc-banner.scc-bottom-left  .scc-btn,
#scc-banner.scc-bottom-right .scc-btn,
#scc-banner.scc-top-left     .scc-btn,
#scc-banner.scc-top-right    .scc-btn {
    text-align: center;
}

/* Mobile: column παντού */
@media (max-width: 520px) {
    #scc-banner.scc-bottom-left,
    #scc-banner.scc-bottom-right,
    #scc-banner.scc-top-left,
    #scc-banner.scc-top-right {
        width: calc(100vw - 32px);
    }
    #scc-banner.scc-bottom-left  #scc-buttons,
    #scc-banner.scc-bottom-right #scc-buttons,
    #scc-banner.scc-top-left     #scc-buttons,
    #scc-banner.scc-top-right    #scc-buttons,
    #scc-banner.scc-popup        #scc-buttons {
        flex-direction: column;
        flex-wrap: nowrap;
    }
    #scc-banner .scc-btn {
        width: 100%;
        text-align: center;
    }
}

#scc-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
#scc-links a {
    font-size: 12px;
    color: #666;
    text-decoration: underline;
}
#scc-links a:hover { color: #111; }

/* ===========================
   Preferences Modal
   =========================== */
#scc-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
}
#scc-modal.active { display: flex; }

#scc-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

#scc-modal-box {
    position: relative;
    background: #fff;
    color: #1a1a1a;
    border-radius: 4px;
    padding: 32px 28px 24px;
    width: 92%;
    max-width: 500px;
    z-index: 1;
    box-shadow: 0 4px 30px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow-y: auto;
}

#scc-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 4px 6px;
}
#scc-modal-close:hover { color: #111; }

#scc-modal-box h2 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 700;
}

.scc-category {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #ebebeb;
    gap: 16px;
}
.scc-category:last-of-type { border-bottom: none; }

.scc-category-info { flex: 1; }
.scc-category-info strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13.5px;
    font-weight: 600;
}
.scc-category-info span { font-size: 12.5px; color: #666; }

/* Toggle */
.scc-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}
.scc-toggle input { display: none; }
.scc-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}
.scc-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.scc-toggle input:checked + .scc-toggle-slider { background: #8a7a4a; }
.scc-toggle input:checked + .scc-toggle-slider::before { transform: translateX(20px); }
.scc-toggle input:disabled + .scc-toggle-slider { opacity: 0.55; cursor: not-allowed; }

.scc-modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ===========================
   Floating Icon
   =========================== */
#scc-icon {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99999;
    width: 42px; height: 42px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    transition: transform 0.2s;
    align-items: center;
    justify-content: center;
    background: #8a7a4a;
    color: #fff;
}
#scc-icon:hover { transform: scale(1.08); }
#scc-icon.visible { display: flex; }
