/**
 * NB Cookie Consent - Frontend Styles
 *
 * Dynamic values are applied via CSS custom properties (variables)
 * set inline on the container element by PHP.
 */

#cookie-consent-container {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* Dynamic values via CSS variables */
    --nb-font-size: 14px;
    --nb-font-color: #333333;
    --nb-overlay-display: none;
}

#cookie-consent-container.cookie-consent-rtl {
    direction: rtl;
    text-align: right;
}

#cookie-consent-container.cookie-consent-ltr {
    direction: ltr;
    text-align: left;
}

.cookie-consent-banner {
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
}

.cookie-consent-modal {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0007;
    z-index: 999998;
    display: var(--nb-overlay-display, none);
}

.cookie-consent-content {
    position: relative;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    margin: 0 auto;
    z-index: 1000000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cookie-consent-modal .cookie-consent-content {
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    z-index: 1000001;
    width: 400px;
    max-width: 90vw;
}

.cookie-consent-message {
    margin: 0 0 12px 0;
    font-size: var(--nb-font-size, 14px);
    line-height: 1.5;
    color: var(--nb-font-color, #333333);
}

.cookie-consent-ltr .cookie-consent-message {
    direction: ltr;
    text-align: left !important;
}

.cookie-consent-rtl .cookie-consent-message {
    direction: rtl;
    text-align: right !important;
}

.cookie-consent-privacy-links {
    margin: 0 0 15px 0;
    text-align: center;
    font-size: 12px;
}

.cookie-consent-ltr .cookie-consent-privacy-links {
    text-align: center;
}

.cookie-consent-rtl .cookie-consent-privacy-links {
    text-align: center;
}

.cookie-consent-privacy-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.cookie-consent-privacy-links a:hover {
    color: #007cba;
    text-decoration: underline;
}

.cookie-consent-privacy-links .link-separator {
    color: #ccc;
    margin: 0 8px;
    font-weight: normal;
}

.cookie-consent-privacy-links .manage-preferences {
    cursor: pointer;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.cookie-consent-ltr .cookie-consent-buttons {
    justify-content: center;
}

.cookie-consent-rtl .cookie-consent-buttons {
    justify-content: center;
}

.cookie-consent-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    /* Button width controlled by class */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Auto width (default) */
.cookie-consent-buttons.nb-btn-auto button {
    flex: 0 1 auto;
    min-width: 150px;
}

/* Full width */
.cookie-consent-buttons.nb-btn-full button {
    flex: 1;
    min-width: 120px;
}

.cookie-consent-buttons button:hover {
    opacity: 0.9;
}

.cookie-consent-buttons button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Powered by credit link (Free version only) */
.nb-credit-link {
    margin-top: 12px;
    text-align: center;
    font-size: 11px;
    opacity: 0.6;
}

.nb-credit-link a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.nb-credit-link a:hover {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .cookie-consent-content {
        margin: 10px;
        padding: 15px;
    }

    .cookie-consent-buttons {
        flex-direction: column;
    }

    .cookie-consent-buttons button {
        flex: none;
        width: 100%;
    }

    .nb-credit-link {
        font-size: 10px;
        margin-top: 10px;
    }
}
