/* Upgrade / sign-in dialog for plan limits (assets/js/access.js) and locked states. */
.bambu-access-modal[hidden] {
    display: none;
}

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

.bambu-access-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 14, 33, 0.6);
    opacity: 0;
    transition: opacity 180ms ease;
}

.bambu-access-dialog {
    position: relative;
    width: 440px;
    max-width: 100%;
    padding: 36px 32px 28px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 30px 80px -24px rgba(5, 14, 33, 0.55);
    text-align: center;
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: opacity 180ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bambu-access-dialog::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, #43B263 0%, #3BA295 50%, #3B7AB5 100%);
}

.bambu-access-modal.is-open .bambu-access-backdrop {
    opacity: 1;
}

.bambu-access-modal.is-open .bambu-access-dialog {
    opacity: 1;
    transform: none;
}

.bambu-access-x {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background-color 160ms ease;
}

.bambu-access-x::before,
.bambu-access-x::after {
    content: "";
    position: absolute;
    top: 15px;
    left: 9px;
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: #64748b;
    transform: rotate(45deg);
}

.bambu-access-x::after {
    transform: rotate(-45deg);
}

.bambu-access-x:hover {
    background: #f1f5f9;
}

.bambu-access-icon {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ecfdf5, #eff6ff);
    color: #3BA295;
}

.bambu-access-eyebrow {
    margin: 0 0 6px;
    color: #3BA295;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.is-login .bambu-access-eyebrow {
    display: none;
}

.bambu-access-title {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

.bambu-access-message {
    margin: 0 0 24px;
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
}

.bambu-access-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bambu-access-cta {
    display: block;
    padding: 13px 20px;
    border-radius: 9999px;
    background: linear-gradient(90deg, #43B263 0%, #3BA295 50%, #3B7AB5 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 24px -12px rgba(59, 162, 149, 0.9);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.bambu-access-cta:hover,
.bambu-access-cta:focus-visible,
.bambu-access-lock a.bambu-access-cta,
.bambu-access-dialog a.bambu-access-cta {
    color: #fff;
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -12px rgba(59, 162, 149, 1);
}

.bambu-access-later {
    padding: 10px;
    border: 0;
    background: none;
    color: #64748b;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.bambu-access-later:hover {
    color: #0f172a;
}

body.bambu-access-open {
    overflow: hidden;
}

/* Locked controls: a small padlock after the label. */
[data-access-prompt].filter-btn::after,
.bambu-access-locked-label::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 6px;
    vertical-align: -1px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1zm2 0h6V7a3 3 0 0 0-6 0v3z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1zm2 0h6V7a3 3 0 0 0-6 0v3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Locked part of a page (profile details, submission form…). */
.bambu-access-lock {
    position: relative;
    margin: 24px 0;
    padding: 32px 28px;
    border: 1px solid #d1fae5;
    border-radius: 18px;
    background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 60%, #eff6ff 100%);
    text-align: center;
}

.bambu-access-lock h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 19px;
}

.bambu-access-lock p {
    margin: 0 auto 18px;
    max-width: 520px;
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
}

.bambu-access-lock .bambu-access-cta {
    display: inline-block;
    padding: 11px 26px;
}

/* "7 of 10 full profiles left this month" */
.bambu-access-meter {
    display: flex;
    width: fit-content;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 6px 12px;
    border-radius: 9999px;
    background: #f0fdf4;
    color: #047857;
    font-size: 13px;
    font-weight: 600;
}

.bambu-access-meter a {
    color: #3B7AB5;
    text-decoration: underline;
}

@media (max-width: 767px) {
    .bambu-access-dialog {
        padding: 32px 20px 20px;
    }

    .bambu-access-lock {
        padding: 24px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bambu-access-backdrop,
    .bambu-access-dialog,
    .bambu-access-cta {
        transition: none;
    }
}
