/**
 * Cookie Banner Styles - Padel Vida Design
 * DSGVO-compliant cookie consent banner
 * Version 2.0 - Complete Redesign
 */

/* ===========================
   DESKTOP STYLES (Default)
   =========================== */

/* Banner Container */
#pva-cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #F9F7F4 0%, #E8D5C4 100%);
    box-shadow: 0 -8px 32px rgba(26, 43, 60, 0.15);
    border-top: 3px solid var(--color-terra-cotta, #C86B4B);
    z-index: 999999;
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#pva-cookie-banner.pva-show {
    transform: translateY(0);
}

/* Content Container */
.pva-banner-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

/* Text Section */
.pva-banner-text {
    flex: 1;
    min-width: 400px;
}

.pva-banner-text h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--color-navy, #1A2B3C);
    letter-spacing: -0.02em;
}

.pva-banner-text p {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-azure-dark, #1A4A63);
    font-family: 'Inter', sans-serif;
}

.pva-banner-text a {
    color: var(--color-terra-cotta, #C86B4B);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.pva-banner-text a:hover {
    color: var(--color-terra-cotta-dark, #A85842);
}

/* Button Container - Desktop */
.pva-banner-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-shrink: 0;
}

/* Base Button Style */
.pva-btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0.01em;
    min-width: 140px;
    text-align: center;
    display: inline-block;
}

/* Button Variants */
.pva-btn-primary {
    background: var(--color-olive, #6B7A5A);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(107, 122, 90, 0.3);
}

.pva-btn-primary:hover {
    background: var(--color-olive-light, #8B9D7F);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(107, 122, 90, 0.4);
}

.pva-btn-secondary {
    background: transparent;
    color: var(--color-azure-dark, #1A4A63);
    border: 2px solid var(--color-azure-dark, #1A4A63);
}

.pva-btn-secondary:hover {
    background: var(--color-azure-dark, #1A4A63);
    color: #ffffff;
}

.pva-btn-tertiary {
    background: var(--color-terra-cotta, #C86B4B);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(200, 107, 75, 0.3);
}

.pva-btn-tertiary:hover {
    background: var(--color-terra-cotta-dark, #A85842);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(200, 107, 75, 0.4);
}

/* ===========================
   TABLET STYLES
   =========================== */

@media (max-width: 1024px) and (min-width: 769px) {
    #pva-cookie-banner {
        padding: 1.5rem;
    }

    .pva-banner-content {
        gap: 2rem;
    }

    .pva-banner-text {
        min-width: 300px;
    }

    .pva-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
        min-width: 120px;
    }
}

/* ===========================
   MOBILE STYLES - COMPLETE OVERRIDE
   =========================== */

@media (max-width: 768px) {
    /* Reset Container */
    #pva-cookie-banner {
        padding: 1rem !important;
        max-height: 70vh;
        overflow-y: auto;
    }

    /* Stack Content Vertically */
    .pva-banner-content {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: stretch !important;
    }

    /* Text Section Mobile */
    .pva-banner-text {
        min-width: unset !important;
        width: 100% !important;
    }

    .pva-banner-text h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .pva-banner-text p {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
    }

    /* CRITICAL: Mobile Button Container */
    .pva-banner-buttons {
        /* Override flexbox completely */
        display: block !important;
        width: 100% !important;
        gap: 0 !important;
        text-align: center !important;
        /* Remove whitespace between inline-block elements */
        font-size: 0 !important;
        letter-spacing: -1px !important;
    }

    /* CRITICAL: Mobile Buttons */
    .pva-btn {
        /* Make buttons inline-block for horizontal layout */
        display: inline-block !important;
        /* Each button takes ~31% width */
        width: 31.5% !important;
        /* Small margin between buttons */
        margin: 0 0.9% !important;
        /* Compact padding for mobile */
        padding: 0.625rem 0.25rem !important;
        /* Smaller font for mobile */
        font-size: 0.75rem !important;
        /* Reset font-size from container */
        letter-spacing: normal !important;
        /* Center text */
        text-align: center !important;
        /* Same height for all buttons */
        min-height: 42px !important;
        height: 42px !important;
        /* Handle overflow */
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        /* Align buttons */
        vertical-align: top !important;
        /* Reset min-width */
        min-width: 0 !important;
        /* Ensure proper box model */
        box-sizing: border-box !important;
        /* Center content vertically */
        line-height: 1.8 !important;
        /* No transform on mobile */
        transform: none !important;
    }

    /* Remove hover effects on mobile */
    .pva-btn:hover {
        transform: none !important;
    }

    /* Specific mobile button adjustments */
    .pva-btn-primary,
    .pva-btn-secondary,
    .pva-btn-tertiary {
        /* Ensure all buttons have same dimensions */
        width: 31.5% !important;
        height: 42px !important;
        min-height: 42px !important;
    }

    /* Border adjustment for secondary button */
    .pva-btn-secondary {
        border-width: 1px !important;
    }
}

/* ===========================
   VERY SMALL MOBILE (<375px)
   =========================== */

@media (max-width: 374px) {
    .pva-btn {
        /* Even smaller font */
        font-size: 0.7rem !important;
        /* Less padding */
        padding: 0.5rem 0.125rem !important;
        /* Slightly smaller width to ensure fit */
        width: 31% !important;
        margin: 0 1% !important;
    }
}

/* ===========================
   SETTINGS MODAL
   =========================== */

#pva-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 43, 60, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#pva-settings-modal.pva-show {
    opacity: 1;
}

.pva-modal-content {
    background: linear-gradient(135deg, #FFFFFF 0%, #F9F7F4 100%);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    border: 2px solid var(--color-sand, #E8D5C4);
    box-shadow: 0 16px 48px rgba(26, 43, 60, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#pva-settings-modal.pva-show .pva-modal-content {
    transform: scale(1);
}

.pva-modal-header {
    padding: 2rem;
    border-bottom: 2px solid var(--color-sand, #E8D5C4);
    background: var(--color-white, #FFFFFF);
}

.pva-modal-header h2 {
    margin: 0;
    font-size: 1.75rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--color-navy, #1A2B3C);
    letter-spacing: -0.02em;
}

.pva-modal-header p {
    margin: 0.75rem 0 0 0;
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    color: var(--color-azure-dark, #1A4A63);
    line-height: 1.6;
}

.pva-modal-body {
    padding: 24px;
}

.pva-category {
    margin-bottom: 24px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.pva-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pva-category-header input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

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

.pva-category-header label {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
}

.pva-category-header label strong {
    color: #C86B4B;
}

.pva-category-description {
    padding-left: 32px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.pva-category-description ul {
    margin: 8px 0;
    padding-left: 20px;
}

.pva-category-description li {
    margin: 4px 0;
}

.pva-modal-footer {
    padding: 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.pva-consent-info {
    font-size: 12px;
    color: #999;
    margin-top: 16px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 4px;
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .pva-modal-content {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }

    .pva-modal-header {
        padding: 1.5rem;
    }

    .pva-modal-header h2 {
        font-size: 1.5rem;
    }

    .pva-category-description {
        padding-left: 0;
        margin-top: 12px;
    }
}

/* ===========================
   DARK MODE SUPPORT
   =========================== */

@media (prefers-color-scheme: dark) {
    #pva-cookie-banner {
        background: #2d2d2d;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    }

    .pva-banner-text h3 {
        color: #ffffff;
    }

    .pva-banner-text p {
        color: #cccccc;
    }

    .pva-modal-content {
        background: #2d2d2d;
        color: #ffffff;
    }

    .pva-modal-header {
        border-bottom-color: #444;
    }

    .pva-modal-header h2 {
        color: #ffffff;
    }

    .pva-modal-header p {
        color: #cccccc;
    }

    .pva-category {
        background: #3a3a3a;
    }

    .pva-category-header label {
        color: #ffffff;
    }

    .pva-category-description {
        color: #cccccc;
    }

    .pva-modal-footer {
        border-top-color: #444;
    }

    .pva-consent-info {
        background: #3a3a3a;
        color: #cccccc;
    }
}

/* ===========================
   PRINT STYLES
   =========================== */

@media print {
    #pva-cookie-banner,
    #pva-settings-modal {
        display: none !important;
    }
}