/* Cookie Consent Styles */

/* Base container styling */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1), 0 -2px 4px -1px rgba(0, 0, 0, 0.06);
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
    z-index: 50;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
                Helvetica, Arial, sans-serif, "Apple Color Emoji", 
                "Segoe UI Emoji", "Segoe UI Symbol";
}

/* Container width constraints */
.cookie-consent-container {
    max-width: 1100px; /* Slightly wider max width */
    margin: 0 auto;
    padding: 0 1rem; /* Default padding for small screens */
}

@media (min-width: 768px) { /* Adjusted breakpoint */
    .cookie-consent-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .cookie-consent-container {
        padding: 0 2rem;
    }
}

/* Content layout */
.cookie-consent-content {
    display: flex;
    flex-direction: column; /* Stack vertically by default */
    align-items: flex-start; /* Align items to start */
    gap: 1rem;
}

@media (min-width: 768px) { /* Apply horizontal layout on larger screens */
    .cookie-consent-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* Text content area */
.cookie-consent-text {
    flex-grow: 1; /* Allow text to take available space */
    /* min-width: 0; Remove this if causing issues */
}

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

.cookie-consent-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color); /* Use variable */
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

.cookie-consent-link:hover {
    color: var(--secondary-color); /* Use variable */
}

/* Buttons container */
.cookie-consent-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap */
    align-items: center;
    gap: 0.75rem; /* Slightly reduced gap */
    width: 100%; /* Take full width on small screens */
}

@media (min-width: 768px) {
    .cookie-consent-buttons {
        width: auto; /* Auto width on larger screens */
        flex-wrap: nowrap;
        gap: 1rem; /* Restore original gap */
    }
}

/* Button styles */
.cookie-consent-button {
    padding: 0.6rem 1rem; /* Slightly adjusted padding */
    border-radius: 0.375rem;
    font-size: 0.85rem; /* Slightly smaller font */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    flex-grow: 1; /* Allow buttons to grow on small screens */
    text-align: center;
    border: 1px solid transparent;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .cookie-consent-button {
        flex-grow: 0; /* Don't grow on larger screens */
        padding: 0.5rem 1rem; /* Restore original padding */
        font-size: 0.875rem; /* Restore original font size */
    }
}

.cookie-consent-button-reject {
    background-color: white;
    color: #4b5563;
    border-color: #d1d5db;
}

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

/* Added styles for preferences button */
.cookie-consent-button-preferences {
    background-color: #f3f4f6; /* Light gray */
    color: #374151;
    border-color: #e5e7eb;
}

.cookie-consent-button-preferences:hover {
    background-color: #e5e7eb;
}

.cookie-consent-button-accept {
    background-color: var(--primary-color); /* Use variable */
    color: white;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.cookie-consent-button-accept:hover {
    background-color: var(--secondary-color); /* Use variable */
}

/* Optional: Hide preferences section on small screens initially if too cluttered */
.cookie-consent-preferences {
    width: 100%;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .cookie-consent-preferences {
        display: none; /* Hide detailed prefs on larger banner view? Or integrate differently */
        /* Alternatively, integrate these checkboxes more cleanly if needed */
    }
}

/* Transitions */
.cookie-consent-enter {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.cookie-consent-enter-start {
    opacity: 0;
    transform: translateY(1rem);
}

.cookie-consent-enter-end {
    opacity: 1;
    transform: translateY(0);
}

.cookie-consent-leave {
    transition: opacity 0.2s ease-in, transform 0.2s ease-in;
}

.cookie-consent-leave-start {
    opacity: 1;
    transform: translateY(0);
}

.cookie-consent-leave-end {
    opacity: 0;
    transform: translateY(1rem);
}

/* Privacy policy page styles */
.cookie-consent-privacy-policy {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    line-height: 1.6;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}