/**
 * Euryka WP Utilities - Cookie Consent Banner Styles
 *
 * Colors and border-radius are driven by CSS custom properties set via
 * inline styles from PHP. Fallback values match the default options.
 */

/* ── Base / Hidden state ─────────────────────────── */
.euryka-cc-banner {
    position: fixed;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    box-sizing: border-box;
}

.euryka-cc-banner *,
.euryka-cc-banner *::before,
.euryka-cc-banner *::after {
    box-sizing: inherit;
}

/* Visible state */
.euryka-cc-banner.euryka-cc-visible {
    opacity: 1;
    visibility: visible;
}

/* Hiding (fade-out) state */
.euryka-cc-banner.euryka-cc-hiding {
    opacity: 0;
    visibility: hidden;
}

/* ── Bottom Bar Mode ─────────────────────────────── */
.euryka-cc-bottom-bar {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.euryka-cc-bottom-bar .euryka-cc-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 22px 28px;
    background: var(--euryka-cc-bg, #ffffff);
    color: var(--euryka-cc-text, #1a1a1a);
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08);
}

.euryka-cc-bottom-bar .euryka-cc-heading {
    display: none;
}

/* ── Bottom Left / Bottom Right (floating card) ──── */
.euryka-cc-bottom-left,
.euryka-cc-bottom-right {
    bottom: 24px;
    max-width: 420px;
    width: calc(100% - 48px);
}

.euryka-cc-bottom-left {
    left: 24px;
}

.euryka-cc-bottom-right {
    right: 24px;
}

.euryka-cc-bottom-left .euryka-cc-inner,
.euryka-cc-bottom-right .euryka-cc-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 28px 28px 24px;
    background: var(--euryka-cc-bg, #ffffff);
    color: var(--euryka-cc-text, #1a1a1a);
    border-radius: calc(var(--euryka-cc-radius, 8px) * 2);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.06),
        0 12px 24px -4px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.04);
}

.euryka-cc-bottom-left .euryka-cc-actions,
.euryka-cc-bottom-right .euryka-cc-actions {
    justify-content: flex-start;
}

/* ── Modal Mode ──────────────────────────────────── */
.euryka-cc-modal {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.euryka-cc-modal .euryka-cc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.euryka-cc-modal .euryka-cc-inner {
    position: relative;
    z-index: 2;
    max-width: 520px;
    width: 100%;
    padding: 32px 36px 28px;
    background: var(--euryka-cc-bg, #ffffff);
    color: var(--euryka-cc-text, #1a1a1a);
    border-radius: calc(var(--euryka-cc-radius, 8px) * 2);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.06),
        0 20px 40px -4px rgba(0, 0, 0, 0.15);
    text-align: center;
}

/* ── Content ─────────────────────────────────────── */
.euryka-cc-heading {
    all: unset;
    display: block;
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: var(--euryka-cc-text, #1a1a1a) !important;
    letter-spacing: -0.01em;
    border: none !important;
    background: none !important;
}

.euryka-cc-message {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--euryka-cc-text, #1a1a1a);
    opacity: 0.85;
}

.euryka-cc-privacy-link {
    font-size: 13px;
    text-decoration: underline;
    color: var(--euryka-cc-link, #3b5ce4);
    transition: opacity 0.2s ease;
}

.euryka-cc-privacy-link:hover {
    opacity: 0.75;
}

/* ── Action Buttons ──────────────────────────────── */
.euryka-cc-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.euryka-cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: var(--euryka-cc-radius, 8px);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}

.euryka-cc-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.euryka-cc-btn:active {
    transform: translateY(0);
}

/* Accept — solid filled primary button */
.euryka-cc-btn-accept {
    background: var(--euryka-cc-accept-bg, #3b5ce4);
    color: var(--euryka-cc-accept-color, #ffffff);
    border-color: var(--euryka-cc-accept-bg, #3b5ce4);
}

/* Reject — outline / ghost button */
.euryka-cc-btn-reject {
    background: transparent;
    color: var(--euryka-cc-reject-color, #3b5ce4);
    border-color: var(--euryka-cc-reject-color, #3b5ce4);
}

.euryka-cc-btn-reject:hover {
    background: var(--euryka-cc-reject-color, #3b5ce4);
    color: #ffffff;
    opacity: 1;
}

/* ── Modal-specific layout tweaks ────────────────── */
.euryka-cc-modal .euryka-cc-actions {
    justify-content: center;
    margin-top: 24px;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 640px) {
    .euryka-cc-bottom-bar .euryka-cc-inner {
        flex-direction: column;
        text-align: center;
        padding: 18px 20px;
        gap: 16px;
    }

    .euryka-cc-bottom-bar .euryka-cc-heading {
        display: block;
    }

    .euryka-cc-actions {
        width: 100%;
    }

    .euryka-cc-btn {
        flex: 1;
        text-align: center;
        padding: 12px 16px;
    }

    .euryka-cc-modal .euryka-cc-inner {
        padding: 24px 20px;
    }

    .euryka-cc-bottom-left,
    .euryka-cc-bottom-right {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
        width: auto;
    }

    .euryka-cc-bottom-left .euryka-cc-inner,
    .euryka-cc-bottom-right .euryka-cc-inner {
        padding: 22px 20px 18px;
    }
}
