/**
 * Keeper Cookie Consent Styles
 * 
 * Cookie consent specific styles only.
 * Global styles (buttons, breakpoints, colors, lightbox base) are already available in WordPress.
 */

/* ------------------------------------------------------------ *\
    COOKIE CONSENT POPUP (when moduleVisible)
\* ------------------------------------------------------------ */

#cookie-consent-popup.moduleVisible #cookieConsentPopup {
    display: block;
    background: #2C2C2C;
    color: #fff;
    height: auto;
    max-height: 100vh;
    top: auto;
    bottom: 10px;
}

@media (max-width: 768px) {
    #cookie-consent-popup.moduleVisible #cookieConsentPopup {
        padding: 32px;
    }
}

@media (max-width: 480px) {
    #cookie-consent-popup.moduleVisible #cookieConsentPopup {
        padding: 24px;
    }
}

#cookie-consent-popup.moduleVisible #cookieConsentPopup .closePopup {
    display: none;
}

#cookie-consent-popup.moduleVisible #cookieConsentPopup h2,
#cookie-consent-popup.moduleVisible #cookieConsentPopup p {
    color: #fff;
    text-align: center;
    padding: 0;
}

#cookie-consent-popup.moduleVisible #cookieConsentPopup h2 {
    color: white;
    font-size: 24px;
    font-weight: 500;
    width: 100%;
    margin-bottom: 16px;
    text-align: center;
}

@media (max-width: 768px) {
    #cookie-consent-popup.moduleVisible #cookieConsentPopup h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    #cookie-consent-popup.moduleVisible #cookieConsentPopup h2 {
        font-size: 20px;
    }
}

#cookie-consent-popup.moduleVisible #cookieConsentPopup p {
    color: white;
    font-size: 20px;
    text-align: center;
    width: 100%;
}

@media (max-width: 768px) {
    #cookie-consent-popup.moduleVisible #cookieConsentPopup p {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    #cookie-consent-popup.moduleVisible #cookieConsentPopup p {
        font-size: 16px;
    }
}

#cookie-consent-popup.moduleVisible #cookieConsentPopup p a {
    color: #FFC700;
    text-decoration: none;
    white-space: nowrap;
}

#cookie-consent-popup.moduleVisible #cookieConsentPopup p a:hover {
    text-decoration: none;
}

#cookie-consent-popup.moduleVisible #cookieConsentPopup .btn-clear-yellow {
    color: #FFC700;
}

#cookie-consent-popup.moduleVisible #cookieConsentPopup .actions {
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {
    #cookie-consent-popup.moduleVisible #cookieConsentPopup .actions [class^="btn-"] {
        width: 100%;
    }
}

/* ------------------------------------------------------------ *\
    COOKIE CONSENT POPUP (base styles)
\* ------------------------------------------------------------ */

.cookie-consent-popup {
    padding: 20px;
}

@media screen and (max-width: 620px) {
    .cookie-consent-popup {
        padding: 20px;
    }
}

.cookie-consent-popup .modal-content {
    border-radius: 0;
    padding: 40px;
    width: 600px;
    margin: 0 auto;
}

@media screen and (max-width: 620px) {
    .cookie-consent-popup .modal-content {
        width: 100%;
    }
}

.cookie-consent-popup h2 {
    margin-bottom: 20px;
}

.cookie-consent-popup p {
    font-size: 16px;
}

.cookie-consent-popup p a {
    color: #FFC700;
}

.cookie-consent-popup .actions {
    margin-top: 40px;
    width: 100%;
}

@media (max-width: 768px) {
    .cookie-consent-popup .actions {
        margin-top: 32px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-popup .actions {
        margin-top: 16px;
    }
}

.cookie-consent-popup .actions .btn-clear-white {
    background: none;
    border: 2px solid #fff;
}

/* RTL support for Arabic */
html[locale='ar_AE'] .cookie-consent-popup .actions a:last-of-type {
    margin-left: 0;
    margin-right: 10px;
}

@media screen and (max-width: 450px) {
    html[locale='ar_AE'] .cookie-consent-popup .actions a:last-of-type {
        margin-top: 15px;
        margin-right: 0;
    }
}

/* ------------------------------------------------------------ *\
    BODY STATE CLASSES - Popup visibility
\* ------------------------------------------------------------ */

body.user-cookie-consent [data-show-on-popup="true"] {
    display: none;
}

body:not(.user-cookie-consent) [data-show-on-popup="false"] {
    display: none;
}

/* ------------------------------------------------------------ *\
    COOKIE CONSENT BANNER
\* ------------------------------------------------------------ */

.cookie-consent-banner {
    position: fixed;
    bottom: 32px;
    inset-inline-end: 32px;
    box-sizing: border-box;
    width: 557px;
    max-width: calc(100vw - 64px);
    padding: 40px;
    background-color: #333333;
    z-index: 9999999999;
    display: flex;
    flex-wrap: wrap;
    flex-flow: row wrap;
    justify-content: flex-start;
    align-items: flex-start;
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 32px;
        right: 24px;
        bottom: 24px;
        max-width: calc(100vw - 48px);
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 24px;
        right: 16px;
        bottom: 16px;
        max-width: calc(100vw - 32px);
    }
}

.cookie-consent-banner .container {
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.cookie-consent-banner h2 {
    color: white;
    font-size: 24px;
    font-weight: 500;
    width: 100%;
    margin-bottom: 16px;
    text-align: center;
}

@media (max-width: 768px) {
    .cookie-consent-banner h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner h2 {
        font-size: 20px;
    }
}

.cookie-consent-banner p {
    color: white;
    font-size: 20px;
    text-align: center;
    width: 100%;
}

@media (max-width: 768px) {
    .cookie-consent-banner p {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner p {
        font-size: 16px;
    }
}

.cookie-consent-banner p a {
    color: #FFC700;
    text-decoration: none;
    white-space: nowrap;
}

.cookie-consent-banner p a:hover {
    text-decoration: none;
}

.cookie-consent-banner .actions {
    margin-top: 40px;
    width: 100%;
}

@media (max-width: 768px) {
    .cookie-consent-banner .actions {
        margin-top: 32px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner .actions {
        margin-top: 16px;
    }
}

.cookie-consent-banner .actions .btn-clear-white {
    background: none;
    border: 2px solid #fff;
}

/* ------------------------------------------------------------ *\
    COOKIE CONSENT BANNER - STATE CLASSES
\* ------------------------------------------------------------ */

/* No consent state - hide banner */
.no-cookie-consent .cookie-consent-banner {
    display: none;
}

/* Hide popup trigger by default */
.no-cookie-consent .cookie-consent-popup-trig,
.cookie-consent-popup-trig {
    display: none;
}

/* With consent - hide banner, show popup trigger */
.user-cookie-consent .cookie-consent-banner {
    display: none;
}

.user-cookie-consent .cookie-consent-popup-trig {
    display: block;
}

/* Hide banner when explicitly requested */
.no-cookie-consent-banner .cookie-consent-banner {
    display: none;
}

/* Default state - hide banner */
.cookie-consent .cookie-consent-banner {
    display: none;
}

/* US implied consent - hide popup trigger */
.us-implied-consent .cookie-consent-popup-trig {
    display: none !important;
}

/* ------------------------------------------------------------ *\
    JAPANESE LOCALE ADJUSTMENTS
\* ------------------------------------------------------------ */

html:lang(ja) .cookie-consent-banner .columns {
    flex-flow: column nowrap;
}

html:lang(ja) .cookie-consent-banner .actions {
    margin-top: 20px;
}

/* ------------------------------------------------------------ *\
    UTILITY CLASSES
\* ------------------------------------------------------------ */

.capitalize {
    text-transform: capitalize;
}

/* Cookie consent only elements */
body.user-cookie-consent .cookie-consent-only {
    display: block;
}

body.user-cookie-consent .no-cookie-consent-only {
    display: none;
}

body.no-cookie-consent .cookie-consent-only {
    display: none;
}

body.no-cookie-consent .no-cookie-consent-only {
    display: block;
}

/* Mobile only trigger */
#cookie_onload_popup.mobile-only {
    display: none;
}

/* ------------------------------------------------------------ *\
    MOBILE: Hide banner, show popup only
\* ------------------------------------------------------------ */

@media (max-width: 767px) {
    /* Hide banner on mobile - popup is used instead */
    .cookie-consent-banner {
        display: none !important;
    }
}
