/* ST Cookie Consent v2.0 - GDPR Romania Compliant */

#st-cookie-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: stFadeIn 0.3s ease;
}

@keyframes stFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes stSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

#st-cookie-banner {
    background: #fff;
    border-radius: 16px;
    max-width: 520px;
    width: 92%;
    padding: 32px 28px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: stSlideUp 0.4s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-height: 90vh;
    overflow-y: auto;
}

/* Logo */
.st-cookie-logo {
    text-align: center;
    margin-bottom: 16px;
}
.st-cookie-logo img {
    height: 40px;
    width: auto;
}

/* Title */
.st-cookie-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
    text-align: center;
}

/* Text */
.st-cookie-text {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 20px;
    text-align: center;
}
.st-cookie-link {
    color: #e53935;
    text-decoration: underline;
}

/* Categories */
.st-cookie-categories {
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    animation: stSlideUp 0.3s ease;
}

.st-cookie-cat {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.st-cookie-cat:last-child {
    border-bottom: none;
}

/* Toggle switch */
.st-cookie-cat label {
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}
.st-cookie-cat input { display: none; }

.st-cat-toggle {
    display: block;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: #ccc;
    position: relative;
    transition: background 0.2s ease;
}
.st-cat-toggle::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.st-cookie-cat input:checked + .st-cat-toggle {
    background: #e53935;
}
.st-cookie-cat input:checked + .st-cat-toggle::after {
    transform: translateX(20px);
}
.st-cookie-cat input:disabled + .st-cat-toggle {
    background: #81c784;
    cursor: not-allowed;
}
.st-cookie-cat input:disabled + .st-cat-toggle::after {
    transform: translateX(20px);
}

.st-cat-info {
    flex: 1;
}
.st-cat-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}
.st-cat-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e8e8e8;
    color: #666;
    margin-left: 6px;
}
.st-cat-always {
    background: #e8f5e9;
    color: #2e7d32;
}
.st-cat-desc {
    font-size: 12px;
    color: #777;
    margin: 4px 0 0;
    line-height: 1.4;
}

/* ============================
   BUTTONS — EQUAL SIZE & WEIGHT
   (ANSPDCP requirement!)
   ============================ */
.st-cookie-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.st-cookie-btn {
    flex: 1;
    padding: 13px 16px;
    border: 2px solid #e53935;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: center;
}

/* Refuz — outlined (same weight as accept) */
.st-btn-reject {
    background: #fff;
    color: #e53935;
    border-color: #e53935;
}
.st-btn-reject:hover {
    background: #fce4ec;
}

/* Setări — neutral */
.st-btn-settings {
    background: #fff;
    color: #555;
    border-color: #ccc;
}
.st-btn-settings:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* Accept — filled */
.st-btn-accept {
    background: #e53935;
    color: #fff;
    border-color: #e53935;
}
.st-btn-accept:hover {
    background: #c62828;
    border-color: #c62828;
}

/* Salvează — filled */
.st-btn-save {
    background: #e53935;
    color: #fff;
    border-color: #e53935;
}
.st-btn-save:hover {
    background: #c62828;
    border-color: #c62828;
}

/* Footer */
.st-cookie-footer {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.st-cookie-footer a {
    font-size: 12px;
    color: #888;
    text-decoration: none;
}
.st-cookie-footer a:hover {
    color: #e53935;
    text-decoration: underline;
}
.st-footer-sep {
    color: #ddd;
    margin: 0 8px;
    font-size: 12px;
}

/* Reopen button removed — footer link is used instead */

/* Responsive */
@media (max-width: 480px) {
    #st-cookie-banner {
        padding: 24px 20px 20px;
        border-radius: 12px;
    }
    .st-cookie-buttons {
        flex-direction: column;
    }
    .st-cookie-btn {
        width: 100%;
    }
    .st-cookie-title {
        font-size: 18px;
    }
}

/* Keyboard accessibility */
.st-cookie-btn:focus,
.st-cat-toggle:focus {
    outline: 2px solid #1976d2;
    outline-offset: 2px;
}
