/* ============================================================
   GDPR Cookie Consent — Urmet theme (blue-urmet #3454d1)
   ============================================================ */

:root {
    --cc-primary: #3454d1;
    --cc-primary-hover: #2842a8;
    --cc-bg: #ffffff;
    --cc-text: #1a1a1a;
    --cc-muted: #6b7280;
    --cc-border: #e5e7eb;
    --cc-overlay: rgba(15, 23, 42, .55);
    --cc-shadow: 0 20px 60px rgba(15, 23, 42, .25);
    --cc-radius: 14px;
}

/* ---------- Banner (first visit) ---------- */
#cc-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    max-width: 980px;
    margin: 0 auto;
    background: var(--cc-bg);
    color: var(--cc-text);
    border-radius: var(--cc-radius);
    box-shadow: var(--cc-shadow);
    padding: 22px 26px;
    z-index: 99998;
    display: none;
    font-family: inherit;
    border: 1px solid var(--cc-border);
    animation: cc-slide-up .35s ease-out;
}
#cc-banner.cc-show { display: block; }

@keyframes cc-slide-up {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

#cc-banner .cc-banner-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}
#cc-banner .cc-banner-text {
    flex: 1 1 380px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--cc-text);
}
#cc-banner .cc-banner-text strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--cc-primary);
}
#cc-banner .cc-banner-text a {
    color: var(--cc-primary);
    text-decoration: underline;
}
#cc-banner .cc-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* ---------- Buttons ---------- */
.cc-btn {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    padding: 11px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s ease;
    line-height: 1;
    white-space: nowrap;
    font-family: inherit;
}
.cc-btn-primary {
    background: var(--cc-primary);
    color: #fff;
    border-color: var(--cc-primary);
}
.cc-btn-primary:hover {
    background: var(--cc-primary-hover);
    border-color: var(--cc-primary-hover);
}
.cc-btn-secondary {
    background: #fff;
    color: var(--cc-text);
    border-color: var(--cc-border);
}
.cc-btn-secondary:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}
.cc-btn-link {
    background: transparent;
    color: var(--cc-primary);
    text-decoration: underline;
    padding: 11px 8px;
}
.cc-btn-link:hover { color: var(--cc-primary-hover); }

/* ---------- Modal (preferințe detaliate) ---------- */
#cc-modal {
    position: fixed;
    inset: 0;
    background: var(--cc-overlay);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: cc-fade-in .2s ease-out;
}
#cc-modal.cc-show { display: flex; }

@keyframes cc-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#cc-modal .cc-modal-dialog {
    background: var(--cc-bg);
    border-radius: var(--cc-radius);
    box-shadow: var(--cc-shadow);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cc-slide-up .3s ease-out;
}
#cc-modal .cc-modal-header {
    padding: 22px 26px 16px;
    border-bottom: 1px solid var(--cc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#cc-modal .cc-modal-header h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: var(--cc-primary);
}
#cc-modal .cc-modal-close {
    background: none;
    border: 0;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: var(--cc-muted);
    padding: 4px 10px;
    border-radius: 6px;
}
#cc-modal .cc-modal-close:hover { background: #f3f4f6; color: var(--cc-text); }

#cc-modal .cc-modal-body {
    padding: 20px 26px;
    overflow-y: auto;
    flex: 1;
}
#cc-modal .cc-intro {
    font-size: 14px;
    line-height: 1.6;
    color: var(--cc-muted);
    margin-bottom: 20px;
}

.cc-category {
    border: 1px solid var(--cc-border);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 12px;
    transition: border-color .15s;
}
.cc-category:hover { border-color: #d1d5db; }

.cc-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cc-category-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--cc-text);
    margin: 0;
}
.cc-category-desc {
    font-size: 13px;
    line-height: 1.55;
    color: var(--cc-muted);
    margin: 8px 0 0 0;
}

/* Toggle switch */
.cc-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}
.cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cc-toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 24px;
    cursor: pointer;
    transition: background .2s;
}
.cc-toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.cc-toggle input:checked + .cc-toggle-slider { background: var(--cc-primary); }
.cc-toggle input:checked + .cc-toggle-slider::before { transform: translateX(18px); }
.cc-toggle input:disabled + .cc-toggle-slider {
    background: var(--cc-primary);
    opacity: .55;
    cursor: not-allowed;
}

#cc-modal .cc-modal-footer {
    padding: 16px 26px 22px;
    border-top: 1px solid var(--cc-border);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

/* ---------- Reopen floating button ---------- */
#cc-reopen {
    position: fixed;
    left: 18px;
    bottom: 18px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cc-primary);
    color: #fff;
    border: 0;
    box-shadow: 0 6px 20px rgba(52, 84, 209, .35);
    cursor: pointer;
    z-index: 99997;
    display: none;
    align-items: center;
    justify-content: center;
    transition: transform .2s, background .2s;
    font-size: 22px;
}
#cc-reopen.cc-show { display: flex; }
#cc-reopen:hover {
    background: var(--cc-primary-hover);
    transform: scale(1.08);
}
#cc-reopen svg { width: 24px; height: 24px; fill: currentColor; }

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
    #cc-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 18px 18px;
    }
    #cc-banner .cc-banner-actions { width: 100%; }
    #cc-banner .cc-banner-actions .cc-btn { flex: 1 1 auto; text-align: center; }
    #cc-modal .cc-modal-footer { justify-content: stretch; }
    #cc-modal .cc-modal-footer .cc-btn { flex: 1 1 auto; text-align: center; }
    #cc-reopen { left: 12px; bottom: 12px; width: 44px; height: 44px; }
}
