/**
 * Access lock — footer icon + modal styles.
 *
 * Token-aligned with the sibling kit (--c-primary, etc.) so the
 * component looks native in the Couvrelles footer.
 *
 * @package CourvellesEvents
 */

.ce-access-root {
    --ceal-primary:   var(--c-primary, #b7995d);
    --ceal-accent:    var(--c-accent,  #6b5f3a);
    --ceal-dark:      var(--c-dark,    #101828);
    --ceal-text:      var(--c-text,    #364153);
    --ceal-muted:     var(--c-muted,   #6a7282);
    --ceal-border:    var(--c-border,  #e5e7eb);
    --ceal-radius:    10px;
    --ceal-radius-sm: 6px;
    --ceal-shadow:    0 1px 2px rgba(16, 24, 40, .06);

    display: inline-block;
    color: inherit;
}

/* ── Trigger button (lock icon in footer) ──────────────────────────── */

.ce-access-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: var(--ceal-radius);
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    line-height: 1.2;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
    opacity: .85;
}

.ce-access-trigger:hover,
.ce-access-trigger:focus-visible {
    background: rgba(255, 255, 255, .08);
    opacity: 1;
    outline: none;
}

.ce-access-trigger.is-unlocked {
    border-color: var(--ceal-primary);
    color: var(--ceal-primary);
    opacity: 1;
}

.ce-access-icon {
    display: inline-flex;
    align-items: center;
}

.ce-access-label {
    white-space: nowrap;
}

.ce-access-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--ceal-primary);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

/* ── Access gate (standalone interstitial document) ────────────────── */

/* No theme CSS loads on the standalone gate document, so set a sane
   baseline. Brand colours still come through the --ceal-* fallbacks
   declared on .ce-access-root. */
body.ce-access-gate-body {
    margin: 0;
    min-height: 100vh;
    background: #f4f3ef;
    color: #364153;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.ce-access-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 56px 20px;
    box-sizing: border-box;
}

.ce-access-gate .ce-access-root {
    display: block;
    width: 100%;
    max-width: 480px;
}

.ce-access-gate-logo {
    display: block;
    margin-bottom: 22px;
    text-decoration: none;
}

.ce-access-gate-logo-img {
    max-width: 200px;
    max-height: 90px;
    width: auto;
    height: auto;
}

.ce-access-gate-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--ceal-dark);
    letter-spacing: .01em;
}

.ce-access-gate-card {
    text-align: center;
    background: #fff;
    color: var(--ceal-text);
    border: 1px solid var(--ceal-border);
    border-radius: 14px;
    padding: 44px 34px;
    box-shadow: 0 4px 24px rgba(16, 24, 40, .08);
}

.ce-access-gate-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: rgba(183, 153, 93, .12);
    color: var(--ceal-primary);
}

.ce-access-gate-title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 600;
    color: var(--ceal-dark);
}

.ce-access-gate-text {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ceal-muted);
}

.ce-access-gate-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    background: var(--ceal-primary);
    border: 1px solid var(--ceal-primary);
    border-radius: var(--ceal-radius);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.ce-access-gate-cta:hover,
.ce-access-gate-cta:focus-visible {
    background: var(--ceal-accent);
    border-color: var(--ceal-accent);
    outline: none;
}

.ce-access-gate-back {
    display: block;
    margin-top: 16px;
    font-size: 13px;
    color: var(--ceal-muted);
    text-decoration: underline;
}

.ce-access-gate-back:hover,
.ce-access-gate-back:focus {
    color: var(--ceal-accent);
}

/* ── Modal overlay ─────────────────────────────────────────────────── */

.ce-access-modal[hidden] {
    display: none !important;
}

.ce-access-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ce-access-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, .55);
    backdrop-filter: blur(2px);
}

.ce-access-dialog {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #fff;
    color: var(--ceal-text);
    border-radius: var(--ceal-radius);
    box-shadow: 0 18px 48px rgba(16, 24, 40, .25);
    padding: 28px 28px 24px;
}

.ce-access-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    border: 0;
    font-size: 28px;
    line-height: 1;
    color: var(--ceal-muted);
    cursor: pointer;
    padding: 4px 8px;
}

.ce-access-close:hover,
.ce-access-close:focus-visible {
    color: var(--ceal-text);
    outline: none;
}

.ce-access-title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 600;
    color: var(--ceal-dark);
}

.ce-access-intro {
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--ceal-muted);
    line-height: 1.5;
}

/* ── Form ──────────────────────────────────────────────────────────── */

.ce-access-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ce-access-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ce-access-field-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ceal-muted);
}

.ce-access-field input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    background: #fff;
    border: 1px solid var(--ceal-border);
    border-radius: var(--ceal-radius-sm);
    font-size: 15px;
    color: var(--ceal-text);
    box-shadow: var(--ceal-shadow);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ce-access-field input[type="password"]:focus {
    outline: none;
    border-color: var(--ceal-primary);
    box-shadow: 0 0 0 3px rgba(183, 153, 93, .18);
}

.ce-access-submit {
    align-self: stretch;
    padding: 11px 18px;
    background: var(--ceal-primary);
    border: 1px solid var(--ceal-primary);
    border-radius: var(--ceal-radius);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.ce-access-submit:hover,
.ce-access-submit:focus-visible {
    background: var(--ceal-accent);
    border-color: var(--ceal-accent);
    outline: none;
}

.ce-access-submit[disabled] {
    opacity: .6;
    cursor: progress;
}

/* ── Inline feedback ──────────────────────────────────────────────── */

.ce-access-message {
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--ceal-radius-sm);
    font-size: 13px;
    line-height: 1.4;
}

.ce-access-message.is-error {
    background: rgba(220, 38, 38, .08);
    color: #991b1b;
    border: 1px solid rgba(220, 38, 38, .25);
}

.ce-access-message.is-success {
    background: rgba(22, 163, 74, .08);
    color: #166534;
    border: 1px solid rgba(22, 163, 74, .25);
}

/* ── Unlocked state ────────────────────────────────────────────────── */

.ce-access-zones {
    margin: 0 0 8px;
    padding: 0 0 0 18px;
    color: var(--ceal-text);
    font-size: 14px;
}

.ce-access-zones li {
    margin: 4px 0;
}

.ce-access-logout {
    margin-top: 16px;
    width: 100%;
    padding: 9px 14px;
    background: transparent;
    border: 1px solid var(--ceal-border);
    border-radius: var(--ceal-radius);
    color: var(--ceal-muted);
    font-size: 13px;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}

.ce-access-logout:hover,
.ce-access-logout:focus-visible {
    color: #991b1b;
    border-color: #991b1b;
    outline: none;
}
