/**
 * WP Cookie Consent Frontend Styles
 */

/* Base styles */
.wp-cookie-consent-banner,
.wp-cookie-consent-modal {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    box-sizing: border-box;
}

.wp-cookie-consent-banner *,
.wp-cookie-consent-modal * {
    box-sizing: border-box;
}

/* Cookie Consent Banner Styles - NextJS Design */
    .wp-cookie-consent-banner {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        z-index: 9998;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    }

    .wp-cookie-consent-banner-container {
        max-width: 1280px;
        margin: 0 auto;
        padding: 1.5rem;
    }

    .wp-cookie-consent-banner-content {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    @media (min-width: 1024px) {
        .wp-cookie-consent-banner-content {
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
        }
    }

    .wp-cookie-consent-banner-left {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        flex: 1;
        min-width: 0;
    }

    .wp-cookie-consent-banner-icon {
        width: 3rem;
        height: 3rem;
        background: linear-gradient(135deg, #ef4444 0%, #eab308 100%);
        border-radius: 0.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .wp-cookie-consent-banner-text {
        flex: 1;
        min-width: 0;
    }

    .wp-cookie-consent-banner-text h3 {
        font-size: 1.125rem;
        font-weight: 600;
        color: #111827;
        margin: 0 0 0.25rem 0;
        line-height: 1.4;
    }

    .wp-cookie-consent-banner-text p {
        font-size: 0.875rem;
        color: #4b5563;
        line-height: 1.6;
        margin: 0;
    }

    .wp-cookie-consent-banner-text a {
        color: #2563eb;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 0.125rem;
    }

    .wp-cookie-consent-banner-text a:hover {
        text-decoration: underline;
    }

    .wp-cookie-consent-external-link-icon {
        width: 0.75rem;
        height: 0.75rem;
        margin-left: 0.125rem;
    }

    .wp-cookie-consent-banner-right {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        flex-shrink: 0;
    }

    @media (min-width: 640px) {
        .wp-cookie-consent-banner-right {
            flex-direction: row;
        }
    }

    .wp-cookie-consent-button {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        font-weight: 500;
        border-radius: 0;
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        white-space: nowrap;
        line-height: 1.25rem;
    }
    
    .wp-cookie-consent-button-icon {
        color: rgb(55 65 81 / .7);
    }

    .wp-cookie-consent-settings-button {
        background: #f3f4f6;
        color: rgb(55 65 81 / .7);
        border: 1px solid transparent;
    }

    .wp-cookie-consent-settings-button:hover {
        background: #e5e7eb;
    }

    .wp-cookie-consent-reject-button {
        background: white;
        color: rgb(55 65 81 / .7);
        border: 1px solid #d1d5db;
    }

    .wp-cookie-consent-reject-button:hover {
        background: #f9fafb;
    }

    .wp-cookie-consent-accept-button {
        background: linear-gradient(135deg, #dc2626 0%, #eab308 100%);
        color: white;
        padding: 0.625rem 1.5rem;
    }

    .wp-cookie-consent-accept-button:hover {
        background: linear-gradient(135deg, #b91c1c 0%, #ca8a04 100%);
        transform: scale(1.05);
    }

    /* Responsive adjustments */
    @media (max-width: 640px) {
        .wp-cookie-consent-banner-container {
            padding: 1rem;
        }
        
        .wp-cookie-consent-banner-left {
            align-items: flex-start;
        }
        
        .wp-cookie-consent-banner-icon {
            width: 2.5rem;
            height: 2.5rem;
        }
    }

/* Modal styles */
.wp-cookie-consent-modal {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    }

    .wp-cookie-consent-modal-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
    }

    .wp-cookie-consent-modal-container {
        background: white;
        border-radius: 1rem;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        max-width: 42rem;
        width: 100%;
        max-height: 80vh;
        overflow-y: auto;
        position: relative;
    }

    .wp-cookie-consent-modal-header {
        padding: 1.5rem;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
    }

    .wp-cookie-consent-modal-header-content {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        flex: 1;
    }

    .wp-cookie-consent-modal-icon {
        width: 2.5rem;
        height: 2.5rem;
        background: rgba(0, 0, 0, 0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-top: 0.125rem;
        color: black;
    }

    .wp-cookie-consent-modal-header h2 {
        font-size: 1.25rem;
        font-weight: 600;
        color: #111827;
        margin: 0;
        line-height: 1.4;
    }

    .wp-cookie-consent-modal-subtitle {
        font-size: 0.875rem;
        color: #4b5563;
        margin: 0.25rem 0 0 0;
        line-height: 1.5;
    }

    .wp-cookie-consent-modal-subtitle a {
        color: #2563eb;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 0.125rem;
    }

    .wp-cookie-consent-modal-subtitle a:hover {
        text-decoration: underline;
    }

    .wp-cookie-consent-modal-close {
        padding: 0.5rem;
        background: transparent;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        color: #6b7280;
        transition: all 0.2s ease;
    }

    .wp-cookie-consent-modal-close:hover {
        background: #f3f4f6;
        color: #111827;
    }

    .wp-cookie-consent-modal-content {
        padding: 1.5rem;
    }

    .wp-cookie-consent-modal-description {
        font-size: 0.875rem;
        color: #4b5563;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }

    .wp-cookie-consent-modal-categories {
        space-y: 1.5rem;
    }

    .wp-cookie-consent-category {
        margin-bottom: 1.5rem;
    }

    .wp-cookie-consent-category:last-child {
        margin-bottom: 0;
    }

    .wp-cookie-consent-category-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 0.75rem;
    }

    .wp-cookie-consent-category-info {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex: 1;
    }

    .wp-cookie-consent-category-icon {
        flex-shrink: 0;
    }

    .wp-cookie-consent-category-icon--essential {
        color: #16a34a;
    }

    .wp-cookie-consent-category-icon--analytical {
        color: #2563eb;
    }

    .wp-cookie-consent-category-icon--advertising {
        color: #eab308;
    }

    .wp-cookie-consent-category-info h4 {
        font-size: 1rem;
        font-weight: 500;
        color: #111827;
        margin: 0;
        line-height: 32px;
    }

    .wp-cookie-consent-category-info p {
        font-size: 0.875rem;
        color: #6b7280;
        margin: 0;
        line-height: 20px;
    }

    .wp-cookie-consent-category-control {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .wp-cookie-consent-always-active {
        font-size: 0.875rem;
        color: #6b7280;
    }

    .wp-cookie-consent-toggle {
        width: 2.75rem;
        height: 1.5rem;
        background: #d1d5db;
        border-radius: 0.75rem;
        border: none;
        cursor: pointer;
        position: relative;
        transition: background-color 0.2s ease;
        padding: 0;
    }

    .wp-cookie-consent-toggle--active,
    .wp-cookie-consent-toggle.active {
        background: #16a34a;
    }

    .wp-cookie-consent-toggle[data-wp-cookie-consent-category="analytical"].active {
        background: #2563eb;
    }

    .wp-cookie-consent-toggle[data-wp-cookie-consent-category="advertising"].active {
        background: #eab308;
    }

    .wp-cookie-consent-toggle-slider {
        width: 1rem;
        height: 1rem;
        background: white;
        border-radius: 50%;
        position: absolute;
        top: 0.25rem;
        left: 0.25rem;
        transition: transform 0.2s ease;
    }

    .wp-cookie-consent-toggle--active .wp-cookie-consent-toggle-slider,
    .wp-cookie-consent-toggle.active .wp-cookie-consent-toggle-slider {
        transform: translateX(1.25rem);
    }

    .wp-cookie-consent-category-description {
        padding-left: 2rem;
    }

    .wp-cookie-consent-category-description p {
        font-size: 0.75rem;
        color: #6b7280;
        line-height: 16px;
        margin: 0;
    }

    .wp-cookie-consent-modal-footer {
        padding: 1.5rem;
        border-top: 1px solid #e5e7eb;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    @media (min-width: 640px) {
        .wp-cookie-consent-modal-footer {
            flex-direction: row;
            justify-content: flex-end;
        }
    }

    .wp-cookie-consent-modal-footer .wp-cookie-consent-button {
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
        font-weight: 500;
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
        line-height: 2;
    }

    .wp-cookie-consent-modal-footer .wp-cookie-consent-reject-button {
        background: white;
        color: #374151;
        border: 1px solid #d1d5db;
        line-height: 2;
    }

    .wp-cookie-consent-modal-footer .wp-cookie-consent-reject-button:hover {
        background: #f9fafb;
    }

    .wp-cookie-consent-modal-footer .wp-cookie-consent-save-button {
        background: rgba(0, 0, 0, 0.8);
        color: white;
    }

    .wp-cookie-consent-modal-footer .wp-cookie-consent-save-button:hover {
        background: black;
    }

    /* Responsive modal */
    @media (max-width: 640px) {
        .wp-cookie-consent-modal {
            padding: 0.5rem;
        }

        .wp-cookie-consent-modal-container {
            max-height: 90vh;
        }

        .wp-cookie-consent-modal-header {
            padding: 1rem;
        }

        .wp-cookie-consent-modal-content {
            padding: 1rem;
        }

        .wp-cookie-consent-modal-footer {
            padding: 1rem;
        }
    }
