/**
 * Vilstaler Cookie Consent Banner Styles
 */

/* Critical: Hide external iframes by default until consent is checked */
iframe[src*="google.com/maps"],
iframe[src*="maps.google"],
iframe[src*="facebook.com"] {
    display: none !important;
}

/* Show iframes only after consent class is added to body */
body.vcc-maps-allowed iframe[src*="google.com/maps"],
body.vcc-maps-allowed iframe[src*="maps.google"],
body.vcc-marketing-allowed iframe[src*="facebook.com"] {
    display: block !important;
}

/* Banner Container */
.vcc-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    animation: vccSlideIn 0.4s ease-out;
}

.vcc-backdrop {
    display: none;
}

.vcc-banner-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 380px;
    width: 380px;
    max-height: 85vh;
    overflow-y: auto;
}

/* Header */
.vcc-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.vcc-banner-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.vcc-close {
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.vcc-close:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

/* Body */
.vcc-banner-body {
    padding: 24px;
}

.vcc-intro-text {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

/* Quick Actions (Collapsed State) */
.vcc-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

/* Details Section (Expanded State) */
.vcc-details {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.vcc-details-intro {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.vcc-expanded-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
}

.vcc-expanded-actions .vcc-btn {
    width: 100%;
}

/* Footer Links */
.vcc-footer-links {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

/* Categories */
.vcc-categories {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vcc-category {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    transition: border-color 0.2s;
}

.vcc-category:hover {
    border-color: #2196F3;
}

.vcc-category label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.vcc-category input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0 12px 0 0;
    cursor: pointer;
    accent-color: #2196F3;
}

.vcc-category input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.vcc-category-name {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
}

.vcc-category-desc {
    margin: 8px 0 0 32px;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

/* Buttons */
.vcc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    width: 100%;
}

.vcc-btn-primary {
    background: #2196F3;
    color: #ffffff;
}

.vcc-btn-primary:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.vcc-btn-secondary {
    background: #ffffff;
    color: #2196F3;
    border: 2px solid #2196F3;
}

.vcc-btn-secondary:hover {
    background: #2196F3;
    color: #ffffff;
}

.vcc-btn-tertiary {
    background: #f5f5f5;
    color: #666;
}

.vcc-btn-tertiary:hover {
    background: #e0e0e0;
    color: #333;
}

.vcc-btn-link {
    background: transparent;
    color: #2196F3;
    padding: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.vcc-btn-link:hover {
    background: #f5f5f5;
    color: #1976D2;
}

.vcc-toggle-icon {
    transition: transform 0.3s ease;
}

.vcc-banner-content.expanded .vcc-toggle-icon {
    transform: rotate(180deg);
}

.vcc-policy-link {
    color: #2196F3;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
}

.vcc-policy-link:hover {
    text-decoration: underline;
}

/* Settings Button (Fixed Bottom Left) */
.vcc-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
    background: #2196F3;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 99999;
}

.vcc-settings-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.5);
}

/* Blocked Content Placeholder */
.vcc-blocked-content {
    background: #f8f9fa;
    border: 2px dashed #2196F3;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    margin: 20px 0;
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: hidden;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vcc-blocked-message {
    max-width: 400px;
    margin: 0 auto;
}

.vcc-blocked-message p {
    margin: 0 0 12px;
    color: #333;
    font-size: 15px;
}

.vcc-blocked-message p strong {
    font-size: 16px;
    color: #1a1a1a;
}

.vcc-unblock-btn {
    background: #2196F3;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}

.vcc-unblock-btn:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* Animations */
@keyframes vccSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .vcc-banner {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
    }

    .vcc-banner-content {
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        max-height: 90vh;
    }

    .vcc-banner-header {
        padding: 20px 20px 12px;
    }

    .vcc-banner-header h3 {
        font-size: 20px;
    }

    .vcc-banner-body {
        padding: 20px;
    }

    .vcc-settings-btn {
        width: 48px;
        height: 48px;
        bottom: 16px;
        left: 16px;
    }

    /* Ensure blocked content never overflows on mobile */
    .vcc-blocked-content {
        margin: 20px 0 !important;
        padding: 30px 15px !important;
        min-height: 250px !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .vcc-blocked-message {
        width: 100%;
    }
}
