/**
 * OSAT Cookie Consent Notice
 *
 * Self-contained styles for the site-wide cookie notice. Intentionally does
 * NOT rely on the plugin's CSS custom properties (defined in main/01-global.css)
 * because this file is enqueued on every front-end page, including any that do
 * not load the main plugin stylesheet. All values are hardcoded and safe.
 *
 * Mobile-first; phone-first tool. Touch target >= 44x44 CSS px.
 */

.osat-cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483000; /* above the app shell, top banner and modals */
    background: #1f2a37;
    color: #f3f4f6;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.25);
    padding: env(safe-area-inset-bottom, 0) 0 0; /* respect iOS home-bar inset */
    transform: translateY(100%);
    transition: transform 0.3s ease;
    will-change: transform;
}

.osat-cookie-consent--visible {
    transform: translateY(0);
}

.osat-cookie-consent__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.osat-cookie-consent__text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.osat-cookie-consent__link,
.osat-cookie-consent__link:visited {
    color: #93c5fd;
    text-decoration: underline;
}

.osat-cookie-consent__link:hover,
.osat-cookie-consent__link:focus {
    color: #bfdbfe;
}

.osat-cookie-consent__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.osat-cookie-consent__accept,
.osat-cookie-consent__decline {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    border: 0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    min-height: 44px;
    padding: 12px 24px;
    width: 100%;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.osat-cookie-consent__accept {
    background: #2563eb;
    color: #ffffff;
}

.osat-cookie-consent__accept:hover,
.osat-cookie-consent__accept:focus {
    background: #1d4ed8;
}

/* Secondary action — visually subordinate to Accept but equally tappable. */
.osat-cookie-consent__decline {
    background: transparent;
    color: #e5e7eb;
    border: 1px solid #4b5563;
}

.osat-cookie-consent__decline:hover,
.osat-cookie-consent__decline:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: #6b7280;
}

.osat-cookie-consent__accept:focus-visible,
.osat-cookie-consent__decline:focus-visible {
    outline: 2px solid #bfdbfe;
    outline-offset: 2px;
}

/* From small tablets up, lay the notice out horizontally. */
@media (min-width: 600px) {
    .osat-cookie-consent__inner {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }

    .osat-cookie-consent__actions {
        flex-direction: row;
        flex: 0 0 auto;
        align-items: center;
    }

    .osat-cookie-consent__accept,
    .osat-cookie-consent__decline {
        width: auto;
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .osat-cookie-consent {
        transition: none;
    }
}
