/**
 * Vitamiinivertailu GDPR Banner - Styles
 * Matching site theme: green gradient, orange CTAs
 */

/* ===== BANNER CONTAINER ===== */
.vitv-gdpr-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.vitv-gdpr-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: vitvGdprFadeIn 0.3s ease;
}

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

.vitv-gdpr-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(27, 94, 32, 0.15);
    animation: vitvGdprSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ===== CONTENT ===== */
.vitv-gdpr-content {
    padding: 32px;
}

/* Header */
.vitv-gdpr-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.vitv-gdpr-icon {
    font-size: 28px;
    line-height: 1;
}

.vitv-gdpr-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1b5e20;
    background: linear-gradient(135deg, #1b5e20 0%, #43a047 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Text */
.vitv-gdpr-text {
    margin: 0 0 24px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #33433a;
}

.vitv-gdpr-link {
    color: #ff6f00;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 111, 0, 0.3);
    transition: border-color 0.2s, color 0.2s;
}

.vitv-gdpr-link:hover {
    color: #e65100;
    border-bottom-color: #ff6f00;
}

/* ===== CATEGORIES ===== */
.vitv-gdpr-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.vitv-gdpr-category {
    padding: 16px;
    background: #f4faf1;
    border: 1px solid #dcebd9;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.vitv-gdpr-category:hover {
    border-color: #81c784;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.08);
}

.vitv-gdpr-category--required {
    background: linear-gradient(135deg, #e8f5e9 0%, #f4faf1 100%);
    border-color: #4caf50;
}

.vitv-gdpr-category__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.vitv-gdpr-category__name {
    font-weight: 600;
    font-size: 15px;
    color: #1f2d22;
}

.vitv-gdpr-category__desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #5b6b5e;
    padding-left: 52px;
}

/* Badge */
.vitv-gdpr-badge {
    margin-left: auto;
    padding: 4px 10px;
    background: linear-gradient(135deg, #ff6f00, #ff8f00);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
}

/* ===== TOGGLE SWITCH ===== */
.vitv-gdpr-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.vitv-gdpr-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
}

.vitv-gdpr-toggle__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #c8e6c9;
    border-radius: 24px;
    transition: 0.3s;
}

.vitv-gdpr-toggle__slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.vitv-gdpr-checkbox:checked + .vitv-gdpr-toggle__slider {
    background: linear-gradient(135deg, #2e7d32, #43a047);
}

.vitv-gdpr-checkbox:checked + .vitv-gdpr-toggle__slider:before {
    transform: translateX(20px);
}

.vitv-gdpr-checkbox:focus + .vitv-gdpr-toggle__slider {
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.3);
}

/* Disabled state for required */
.vitv-gdpr-category--required .vitv-gdpr-toggle__slider {
    background: linear-gradient(135deg, #2e7d32, #43a047);
    opacity: 0.6;
    cursor: not-allowed;
}

.vitv-gdpr-category--required .vitv-gdpr-toggle__slider:before {
    transform: translateX(20px);
}

/* ===== BUTTONS ===== */
.vitv-gdpr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.vitv-gdpr-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0.3px;
}

.vitv-gdpr-btn--primary {
    background: linear-gradient(135deg, #ff6f00 0%, #ff8f00 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 111, 0, 0.35);
}

.vitv-gdpr-btn--primary:hover {
    background: linear-gradient(135deg, #e65100 0%, #ff6f00 100%);
    box-shadow: 0 6px 20px rgba(255, 111, 0, 0.45);
    transform: translateY(-2px);
}

.vitv-gdpr-btn--secondary {
    background: #f4faf1;
    color: #2e7d32;
    border: 2px solid #2e7d32;
}

.vitv-gdpr-btn--secondary:hover {
    background: #e8f5e9;
    color: #1b5e20;
    transform: translateY(-2px);
}

.vitv-gdpr-btn--outline {
    background: transparent;
    color: #5b6b5e;
    border: 2px solid #dcebd9;
}

.vitv-gdpr-btn--outline:hover {
    background: #f4faf1;
    border-color: #81c784;
    color: #2e7d32;
}

/* ===== FOOTER ===== */
.vitv-gdpr-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #dcebd9;
    text-align: center;
}

.vitv-gdpr-powered {
    font-size: 12px;
    color: #81c784;
    font-weight: 500;
}

/* ===== PRIVACY BUTTON (re-open) ===== */
.vitv-gdpr-privacy-fixed {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99999;
}

.vitv-gdpr-privacy-btn {
    padding: 10px 16px;
    background: #ffffff;
    border: 2px solid #2e7d32;
    border-radius: 50px;
    color: #2e7d32;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.vitv-gdpr-privacy-btn:hover {
    background: #2e7d32;
    color: #ffffff;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 640px) {
    .vitv-gdpr-banner {
        padding: 0;
        align-items: flex-end;
    }
    
    .vitv-gdpr-container {
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
        animation: vitvGdprSlideUpMobile 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    @keyframes vitvGdprSlideUpMobile {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .vitv-gdpr-content {
        padding: 24px 20px;
    }
    
    .vitv-gdpr-title {
        font-size: 20px;
    }
    
    .vitv-gdpr-text {
        font-size: 14px;
    }
    
    .vitv-gdpr-category {
        padding: 12px;
    }
    
    .vitv-gdpr-category__desc {
        padding-left: 0;
        margin-top: 8px;
        font-size: 12px;
    }
    
    .vitv-gdpr-category__header {
        flex-wrap: wrap;
    }
    
    .vitv-gdpr-badge {
        margin-left: 0;
        margin-top: 4px;
        font-size: 10px;
    }
    
    .vitv-gdpr-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .vitv-gdpr-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .vitv-gdpr-privacy-fixed {
        bottom: 10px;
        left: 10px;
    }
    
    .vitv-gdpr-privacy-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .vitv-gdpr-content {
        padding: 20px 16px;
    }
    
    .vitv-gdpr-icon {
        font-size: 24px;
    }
    
    .vitv-gdpr-title {
        font-size: 18px;
    }
    
    .vitv-gdpr-category {
        padding: 10px;
    }
    
    .vitv-gdpr-category__name {
        font-size: 14px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .vitv-gdpr-container {
        background: #1f2d22;
    }
    
    .vitv-gdpr-title {
        background: linear-gradient(135deg, #81c784 0%, #4caf50 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }
    
    .vitv-gdpr-text {
        color: #dcebd9;
    }
    
    .vitv-gdpr-category {
        background: #263d2a;
        border-color: #2e7d32;
    }
    
    .vitv-gdpr-category--required {
        background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    }
    
    .vitv-gdpr-category__name {
        color: #f4faf1;
    }
    
    .vitv-gdpr-category__desc {
        color: #a5d6a7;
    }
    
    .vitv-gdpr-btn--secondary {
        background: #263d2a;
        border-color: #81c784;
        color: #81c784;
    }
    
    .vitv-gdpr-btn--outline {
        border-color: #4caf50;
        color: #81c784;
    }
    
    .vitv-gdpr-footer {
        border-top-color: #2e7d32;
    }
}

/* Hide banner when processing */
.vitv-gdpr-banner.vitv-gdpr--processing {
    pointer-events: none;
}

.vitv-gdpr-banner.vitv-gdpr--processing .vitv-gdpr-container {
    opacity: 0.7;
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
    .vitv-gdpr-backdrop,
    .vitv-gdpr-container,
    .vitv-gdpr-toggle__slider,
    .vitv-gdpr-toggle__slider:before,
    .vitv-gdpr-btn,
    .vitv-gdpr-link {
        animation: none !important;
        transition: none !important;
    }
}
