/**
 * La Mota Loyalty Card
 * Self-contained styles. All selectors prefixed with .lmlc-card to avoid
 * conflicts with theme or page-builder CSS.
 */

.lmlc-card,
.lmlc-card * {
    box-sizing: border-box;
}

.lmlc-card {
    --lmlc-teal: #1eb0ac;
    --lmlc-teal-glow: rgba(30, 176, 172, 0.45);
    --lmlc-dark: #0a1414;
    --lmlc-text: #ffffff;
    --lmlc-text-muted: rgba(255, 255, 255, 0.65);
    --lmlc-radius: 20px;

    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--lmlc-text);
}

.lmlc-card__inner {
    position: relative;
    aspect-ratio: 5 / 7;
    border-radius: var(--lmlc-radius);
    overflow: hidden;
    background-color: var(--lmlc-dark);
    background-image: var(--lmlc-bg);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 0 60px rgba(30, 176, 172, 0.15) inset;
}

/* Gradient overlay so bottom text stays readable over any background */
.lmlc-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 20, 20, 0) 0%,
        rgba(10, 20, 20, 0) 45%,
        rgba(10, 20, 20, 0.75) 75%,
        rgba(10, 20, 20, 0.95) 100%
    );
    pointer-events: none;
}

.lmlc-card__content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 28px 28px;
    gap: 16px;
    z-index: 1;
}

.lmlc-card__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--lmlc-text-muted);
    margin-bottom: 4px;
}

.lmlc-card__name {
    font-size: clamp(22px, 5vw, 32px);
    font-weight: 800;
    line-height: 1.1;
    color: var(--lmlc-text);
    word-break: break-word;
}

.lmlc-card__balance {
    font-size: clamp(48px, 11vw, 72px);
    font-weight: 900;
    line-height: 1;
    color: var(--lmlc-teal);
    text-shadow: 0 0 30px var(--lmlc-teal-glow);
    letter-spacing: -0.02em;
}

.lmlc-card__actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.lmlc-card__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    border: 2px solid var(--lmlc-teal);
    background-color: var(--lmlc-teal);
    color: #ffffff !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease, color 0.2s ease;
    text-decoration: none !important;
}

.lmlc-card a.lmlc-card__btn,
.lmlc-card a.lmlc-card__btn:visited,
.lmlc-card a.lmlc-card__btn:link {
    color: #ffffff !important;
    text-decoration: none !important;
}

.lmlc-card__btn:hover,
.lmlc-card__btn:focus-visible {
    background-color: transparent;
    color: var(--lmlc-teal) !important;
    box-shadow: 0 0 24px var(--lmlc-teal-glow);
    outline: none;
}

.lmlc-card a.lmlc-card__btn:hover,
.lmlc-card a.lmlc-card__btn:focus-visible {
    color: var(--lmlc-teal) !important;
}

.lmlc-card__btn:active {
    transform: translateY(1px);
}

.lmlc-card__btn--share {
    background-color: transparent;
    color: var(--lmlc-teal) !important;
}

.lmlc-card a.lmlc-card__btn--share,
.lmlc-card a.lmlc-card__btn--share:visited,
.lmlc-card a.lmlc-card__btn--share:link {
    color: var(--lmlc-teal) !important;
}

.lmlc-card__btn--share:hover,
.lmlc-card__btn--share:focus-visible {
    background-color: var(--lmlc-teal);
    color: #ffffff !important;
}

.lmlc-card a.lmlc-card__btn--share:hover,
.lmlc-card a.lmlc-card__btn--share:focus-visible {
    color: #ffffff !important;
}

.lmlc-card__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Redeem-on-paycheck button: full-width (sole child of __actions, flex:1),
   uppercased to read as the single primary action. */
.lmlc-card__btn--redeem {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 16px;
}

.lmlc-card__btn--disabled,
.lmlc-card__btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
.lmlc-card__btn--disabled:hover,
.lmlc-card__btn[disabled]:hover {
    background-color: var(--lmlc-teal);
    color: #ffffff !important;
    box-shadow: none;
}

.lmlc-card__redeem-hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--lmlc-text-muted);
    text-align: center;
}

/* In-app decision notice (approved/declined), shown once until dismissed. */
.lmlc-card__notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.4;
}
.lmlc-card__notice--ok {
    background: rgba(30, 176, 172, 0.18);
    border: 1px solid var(--lmlc-teal);
    color: #ffffff;
}
.lmlc-card__notice--no {
    background: rgba(179, 45, 46, 0.18);
    border: 1px solid #b32d2e;
    color: #ffffff;
}
.lmlc-card__notice-text { flex: 1; }
.lmlc-card__notice-dismiss {
    background: transparent;
    border: 0;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    opacity: 0.8;
}
.lmlc-card__notice-dismiss:hover { opacity: 1; }

/* Share menu */
.lmlc-card__share-menu {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 28px;
    background: rgba(10, 20, 20, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(30, 176, 172, 0.3);
    border-radius: 14px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 2;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: lmlcSlideUp 0.2s ease-out;
}

.lmlc-card__share-menu[hidden] {
    display: none;
}

@keyframes lmlcSlideUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lmlc-card__share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    color: var(--lmlc-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.15s ease;
}

.lmlc-card__share-option:hover,
.lmlc-card__share-option:focus-visible {
    background-color: rgba(30, 176, 172, 0.15);
    color: var(--lmlc-text);
    outline: none;
}

/* Toast */
.lmlc-card__toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--lmlc-teal);
    color: var(--lmlc-text);
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 24px var(--lmlc-teal-glow);
    z-index: 999999;
    animation: lmlcToast 2.4s ease-out forwards;
    pointer-events: none;
    white-space: nowrap;
}

.lmlc-card__toast[hidden] {
    display: none;
}

@keyframes lmlcToast {
    0%   { opacity: 0; transform: translate(-50%, -16px); }
    12%  { opacity: 1; transform: translate(-50%, 0); }
    88%  { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -8px); }
}

/* Mobile tweaks */
@media (max-width: 480px) {
    .lmlc-card__content {
        padding: 20px 22px 22px;
    }
    .lmlc-card__share-menu {
        left: 22px;
        right: 22px;
        bottom: 22px;
    }
}

/* ========================================
   Logged-out CTA card
   ======================================== */
.lmlc-card__cta-text {
    margin-bottom: 8px;
}

.lmlc-card__cta-headline {
    font-size: clamp(24px, 5.5vw, 34px);
    font-weight: 900;
    line-height: 1.05;
    color: var(--lmlc-text);
    margin-bottom: 8px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.lmlc-card__cta-subhead {
    font-size: clamp(13px, 2.8vw, 15px);
    font-weight: 500;
    line-height: 1.45;
    color: var(--lmlc-text-muted);
}

/* ========================================
   Excluded-account card (employee/store/whitelist)
   Uses a muted amber accent instead of teal so the card
   reads as a clearly different state at a glance.
   ======================================== */
.lmlc-card--excluded {
    --lmlc-accent: #d4a24c;
    --lmlc-accent-glow: rgba(212, 162, 76, 0.35);
}

.lmlc-card--excluded .lmlc-card__inner {
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 0 60px rgba(212, 162, 76, 0.12) inset;
}

.lmlc-card__excluded-notice {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 16px;
    margin-top: 8px;
}

.lmlc-card--excluded .lmlc-card__excluded-notice .lmlc-card__label {
    color: var(--lmlc-accent);
    text-shadow: 0 0 18px var(--lmlc-accent-glow);
}

.lmlc-card__excluded-message {
    font-size: clamp(13px, 2.8vw, 15px);
    font-weight: 500;
    line-height: 1.45;
    color: var(--lmlc-text-muted);
}

/* ========================================
   Budtender wallet card (employee/store credit)
   Distinct color scheme so it never gets confused with
   the regular loyalty card or the ineligible card.
   ======================================== */
.lmlc-card--budtender {
    --lmlc-bud-accent: #8b5cf6;        /* purple */
    --lmlc-bud-accent-glow: rgba(139, 92, 246, 0.4);
    --lmlc-bud-money: var(--lmlc-teal);     /* match the brand teal */
    --lmlc-bud-money-glow: var(--lmlc-teal-glow);
    --lmlc-venmo: #008cff;
    --lmlc-cashapp: #00d54b;
}

.lmlc-card--budtender .lmlc-card__inner {
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 0 60px rgba(139, 92, 246, 0.15) inset;
}

.lmlc-card__balance--money {
    color: var(--lmlc-bud-money);
    text-shadow: 0 0 30px var(--lmlc-bud-money-glow);
    font-size: clamp(40px, 9vw, 60px);
}

/* Handle display rows */
.lmlc-card__handles {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 4px 0 2px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.lmlc-card__handle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.3;
}

.lmlc-card__handle-label {
    font-weight: 700;
    color: var(--lmlc-text-muted);
    min-width: 64px;
    flex-shrink: 0;
}

.lmlc-card__handle-display {
    flex: 1;
    color: var(--lmlc-text);
    font-weight: 600;
    word-break: break-all;
}

.lmlc-card__handle-display em {
    color: var(--lmlc-text-muted);
    font-style: italic;
    font-weight: 500;
}

.lmlc-card__handle-edit {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 5px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--lmlc-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lmlc-card__handle-edit:hover,
.lmlc-card__handle-edit:focus-visible {
    background: rgba(139, 92, 246, 0.15);
    color: var(--lmlc-text);
    border-color: var(--lmlc-bud-accent);
    outline: none;
}

.lmlc-card__handle-edit svg {
    width: 14px;
    height: 14px;
}

/* Edit form */
.lmlc-card__handle-edit-form {
    margin-top: 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid var(--lmlc-bud-accent);
    box-shadow: 0 0 20px var(--lmlc-bud-accent-glow);
}

.lmlc-card__handle-edit-form[hidden] {
    display: none;
}

.lmlc-card__handle-edit-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--lmlc-text-muted);
    margin-bottom: 6px;
}

.lmlc-card__handle-edit-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lmlc-card__handle-edit-prefix {
    font-size: 16px;
    font-weight: 800;
    color: var(--lmlc-text-muted);
    padding: 0 4px;
}

.lmlc-card__handle-input {
    flex: 1;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: var(--lmlc-text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.lmlc-card__handle-input:focus {
    outline: none;
    border-color: var(--lmlc-bud-accent);
    box-shadow: 0 0 0 2px var(--lmlc-bud-accent-glow);
}

.lmlc-card__handle-save,
.lmlc-card__handle-cancel {
    border: none;
    cursor: pointer;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
    border-radius: 8px;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.lmlc-card__handle-save {
    padding: 9px 14px;
    font-size: 13px;
    background: var(--lmlc-bud-accent);
    color: #ffffff;
}

.lmlc-card__handle-save:hover:not(:disabled) {
    background: #7c4ff0;
}

.lmlc-card__handle-save:disabled {
    opacity: 0.6;
    cursor: wait;
}

.lmlc-card__handle-cancel {
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    color: var(--lmlc-text-muted);
    font-size: 22px;
    line-height: 1;
}

.lmlc-card__handle-cancel:hover {
    color: var(--lmlc-text);
    background: rgba(255, 255, 255, 0.08);
}

.lmlc-card__handle-error {
    margin-top: 6px;
    color: #ff8b8b;
    font-size: 12px;
    font-weight: 600;
}

.lmlc-card__handle-error[hidden] {
    display: none;
}

/* Budtender action buttons */
.lmlc-card__btn--venmo {
    background-color: var(--lmlc-venmo);
    border-color: var(--lmlc-venmo);
}

.lmlc-card__btn--venmo:hover,
.lmlc-card__btn--venmo:focus-visible {
    background-color: transparent;
    color: var(--lmlc-venmo) !important;
    box-shadow: 0 0 24px rgba(0, 140, 255, 0.45);
}

.lmlc-card a.lmlc-card__btn--venmo,
.lmlc-card a.lmlc-card__btn--venmo:visited {
    color: #ffffff !important;
}

.lmlc-card a.lmlc-card__btn--venmo:hover,
.lmlc-card a.lmlc-card__btn--venmo:focus-visible {
    color: var(--lmlc-venmo) !important;
}

.lmlc-card__btn--cashapp {
    background-color: var(--lmlc-cashapp);
    border-color: var(--lmlc-cashapp);
}

.lmlc-card__btn--cashapp:hover,
.lmlc-card__btn--cashapp:focus-visible {
    background-color: transparent;
    color: var(--lmlc-cashapp) !important;
    box-shadow: 0 0 24px rgba(0, 213, 75, 0.45);
}

.lmlc-card a.lmlc-card__btn--cashapp,
.lmlc-card a.lmlc-card__btn--cashapp:visited {
    color: #ffffff !important;
}

.lmlc-card a.lmlc-card__btn--cashapp:hover,
.lmlc-card a.lmlc-card__btn--cashapp:focus-visible {
    color: var(--lmlc-cashapp) !important;
}

.lmlc-card__btn--disabled {
    opacity: 0.55;
    cursor: pointer; /* still clickable — opens edit form */
}

/* ==========================================================================
   ADD-TO-WALLET BUTTONS — sit inside the card, below the share actions
   ========================================================================== */
.lmlc-card__wallet {
    margin-top: 14px;
}

.lmlc-card__wallet-label {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lmlc-text-muted);
    margin-bottom: 8px;
}

.lmlc-card__wallet-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lmlc-card__wallet-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.lmlc-card__wallet-btn:hover {
    transform: translateY(-1px);
    background: #000000;
    border-color: rgba(255, 255, 255, 0.35);
}

.lmlc-card__wallet-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

/* ==========================================================================
   INSTALL BANNER — "Install La Mota Loyalty" (rendered below the card)
   ========================================================================== */
.lmlc-install {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 420px;
    margin: 16px auto 0;
    padding: 14px 16px;
    background: var(--lmlc-dark, #0a1414);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 4px solid var(--lmlc-teal, #1eb0ac);
    border-radius: 14px;
    color: #ffffff;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4);
}

.lmlc-install[hidden] { display: none; }

.lmlc-install__icon {
    font-size: 1.7rem;
    line-height: 1;
    flex: 0 0 auto;
}

.lmlc-install__body { flex: 1 1 auto; min-width: 0; }

.lmlc-install__title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.lmlc-install__text {
    font-size: 0.8rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
}

.lmlc-install__text strong { color: #ffffff; }

.lmlc-install__glyph {
    color: var(--lmlc-teal, #1eb0ac);
    font-weight: 700;
}

.lmlc-install__actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.lmlc-install__btn {
    background: var(--lmlc-teal, #1eb0ac);
    color: #ffffff;
    border: none;
    border-radius: 9px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.lmlc-install__btn[hidden] { display: none; }

.lmlc-install__dismiss {
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    border: none;
    padding: 2px 4px;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: underline;
    -webkit-tap-highlight-color: transparent;
}

.lmlc-install__dismiss:hover { color: #ffffff; }

.lmlc-install__hint {
    display: block;
    margin-top: 3px;
    font-size: 0.7rem;
    opacity: 0.6;
}

/* =========================================================================
 * HELP / TROUBLESHOOTING
 * "?" button pinned to the card's top-right + the message modal it opens.
 * ========================================================================= */
.lmlc-card__help {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    background: rgba(10, 20, 20, 0.45);
    color: var(--lmlc-text);
    cursor: pointer;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: transform 0.15s ease, box-shadow 0.15s ease,
        background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.lmlc-card__help:hover,
.lmlc-card__help:focus-visible {
    background: var(--lmlc-teal);
    border-color: var(--lmlc-teal);
    color: #ffffff;
    box-shadow: 0 0 20px var(--lmlc-teal-glow);
    outline: none;
}
.lmlc-card__help:active {
    transform: translateY(1px);
}
.lmlc-card__help-icon {
    width: 20px;
    height: 20px;
}

.lmlc-help-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lmlc-help-modal[hidden] {
    display: none;
}
.lmlc-help-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.lmlc-help-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    background: var(--lmlc-dark);
    color: var(--lmlc-text);
    border-radius: var(--lmlc-radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(30, 176, 172, 0.15) inset;
    padding: 24px 22px 22px;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    animation: lmlcSlideUp 0.2s ease;
}
.lmlc-help-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--lmlc-text-muted);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
}
.lmlc-help-modal__close:hover,
.lmlc-help-modal__close:focus-visible {
    color: var(--lmlc-text);
    outline: none;
}
.lmlc-help-modal__title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    color: var(--lmlc-text);
}
.lmlc-help-modal__intro {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--lmlc-text-muted);
}
.lmlc-help-modal__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--lmlc-text-muted);
    margin-bottom: 8px;
}
.lmlc-help-modal__input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 110px;
    resize: vertical;
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
    color: var(--lmlc-text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}
.lmlc-help-modal__input:focus {
    outline: none;
    border-color: var(--lmlc-teal);
    box-shadow: 0 0 0 3px var(--lmlc-teal-glow);
}
.lmlc-help-modal__input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.lmlc-help-modal__error {
    margin-top: 10px;
    font-size: 13px;
    color: #ff8a80;
}
.lmlc-help-modal__error[hidden] {
    display: none;
}
.lmlc-help-modal__actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.lmlc-help-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border-radius: 10px;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    border: 2px solid var(--lmlc-teal);
    transition: transform 0.15s ease, box-shadow 0.15s ease,
        background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.lmlc-help-modal__btn--send {
    background: var(--lmlc-teal);
    color: #ffffff;
}
.lmlc-help-modal__btn--send:hover:not(:disabled),
.lmlc-help-modal__btn--send:focus-visible {
    background: transparent;
    color: var(--lmlc-teal);
    box-shadow: 0 0 20px var(--lmlc-teal-glow);
    outline: none;
}
.lmlc-help-modal__btn--send:disabled {
    opacity: 0.6;
    cursor: default;
}
.lmlc-help-modal__btn--ghost {
    background: transparent;
    color: var(--lmlc-text-muted);
    border-color: rgba(255, 255, 255, 0.2);
}
.lmlc-help-modal__btn--ghost:hover,
.lmlc-help-modal__btn--ghost:focus-visible {
    color: var(--lmlc-text);
    border-color: rgba(255, 255, 255, 0.4);
    outline: none;
}
.lmlc-help-modal__success {
    text-align: center;
    padding: 12px 6px 6px;
}
.lmlc-help-modal__success[hidden] {
    display: none;
}
.lmlc-help-modal__success-icon {
    display: block;
    width: 56px;
    height: 56px;
    margin: 0 auto 10px;
    color: var(--lmlc-teal);
}
.lmlc-help-modal__success h3 {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 800;
    color: var(--lmlc-text);
}
.lmlc-help-modal__success p {
    margin: 0;
    font-size: 14px;
    color: var(--lmlc-text-muted);
}
body.lmlc-help-open {
    overflow: hidden;
}

/* =========================================================================
   POINTS HISTORY — button (top-left, mirrors the help button) + modal
   ========================================================================= */
.lmlc-card__history-btn {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px 0 10px;
    border-radius: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    background: rgba(10, 20, 20, 0.45);
    color: var(--lmlc-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: transform 0.15s ease, box-shadow 0.15s ease,
        background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.lmlc-card__history-btn:hover,
.lmlc-card__history-btn:focus-visible {
    color: var(--lmlc-teal);
    border-color: var(--lmlc-teal);
    box-shadow: 0 0 18px var(--lmlc-teal-glow);
    outline: none;
}
.lmlc-card__history-icon { width: 18px; height: 18px; flex: none; }
.lmlc-card__history-label { line-height: 1; }

body.lmlc-history-open { overflow: hidden; }

.lmlc-history-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lmlc-history-modal[hidden] { display: none; }
.lmlc-history-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.lmlc-history-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background: var(--lmlc-dark);
    color: var(--lmlc-text);
    border-radius: var(--lmlc-radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(30, 176, 172, 0.15) inset;
    padding: 24px 22px 18px;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    animation: lmlcSlideUp 0.2s ease;
}
.lmlc-history-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--lmlc-text-muted);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
}
.lmlc-history-modal__close:hover,
.lmlc-history-modal__close:focus-visible { color: var(--lmlc-text); outline: none; }
.lmlc-history-modal__title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 800;
}
.lmlc-history-modal__intro {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--lmlc-text-muted);
    line-height: 1.45;
}
.lmlc-history-modal__loading,
.lmlc-history-modal__empty {
    color: var(--lmlc-text-muted);
    font-size: 14px;
    padding: 10px 2px;
}
.lmlc-history-modal__error {
    color: #ff8a80;
    font-size: 14px;
    padding: 8px 2px;
}

/* Scrollable list */
.lmlc-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.lmlc-history-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.lmlc-history-row__head {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 4px;
    background: transparent;
    border: none;
    color: var(--lmlc-text);
    font: inherit;
    text-align: left;
    cursor: default;
}
.lmlc-history-row.is-expandable .lmlc-history-row__head { cursor: pointer; }
.lmlc-history-row.is-expandable .lmlc-history-row__head:hover { color: var(--lmlc-teal); }
.lmlc-history-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lmlc-history-row__label { font-size: 14px; font-weight: 600; }
.lmlc-history-row__date { font-size: 12px; color: var(--lmlc-text-muted); }
.lmlc-history-row__right { text-align: right; display: flex; flex-direction: column; gap: 2px; flex: none; }
.lmlc-history-row__pts { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lmlc-history-row__pts.is-earn { color: var(--lmlc-teal); }
.lmlc-history-row__pts.is-spend { color: var(--lmlc-text-muted); }
.lmlc-history-row__bal { font-size: 11px; color: var(--lmlc-text-muted); }
.lmlc-history-row__chev {
    width: 18px; height: 18px; flex: none;
    color: var(--lmlc-text-muted);
    transition: transform 0.18s ease;
}
.lmlc-history-row.is-open .lmlc-history-row__chev { transform: rotate(180deg); }

/* Expanded GrowFlow detail */
.lmlc-history-row__detail {
    padding: 4px 4px 14px;
    font-size: 13px;
    color: var(--lmlc-text-muted);
}
.lmlc-history-row__detail[hidden] { display: none; }
.lmlc-history-detail { margin: 0; }
.lmlc-history-detail > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.lmlc-history-detail dt { color: var(--lmlc-text-muted); }
.lmlc-history-detail dd { margin: 0; color: var(--lmlc-text); font-weight: 600; text-align: right; }
.lmlc-history-detail__rewards { margin-top: 8px; }
.lmlc-history-detail__rewards-label {
    display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--lmlc-text-muted); margin-bottom: 4px;
}
.lmlc-history-detail__rewards ul { list-style: none; margin: 0; padding: 0; }
.lmlc-history-detail__rewards li { color: var(--lmlc-text); padding: 2px 0; }
.lmlc-history-detail__rewards em { color: var(--lmlc-teal); font-style: normal; }
.lmlc-history-detail__note { display: block; margin-top: 6px; color: var(--lmlc-text-muted); font-style: italic; }

.lmlc-history-spinner {
    display: inline-block;
    width: 14px; height: 14px;
    vertical-align: -2px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--lmlc-teal);
    border-radius: 50%;
    animation: lmlcSpin 0.7s linear infinite;
}
@keyframes lmlcSpin { to { transform: rotate(360deg); } }

/* GrowFlow full-history rows: secondary "redeemed" line + voided state */
.lmlc-history-row__sub {
    font-size: 11px;
    color: var(--lmlc-text-muted);
    font-variant-numeric: tabular-nums;
}
.lmlc-history-row__pts.is-void {
    font-size: 12px;
    font-weight: 700;
    color: var(--lmlc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ============================================================================
 * Brand fonts (v1.8.6): Inter for body/UI (baked above), Montserrat for the
 * display elements — name, balance numbers, CTA headlines, modal/section titles.
 * Loaded via the 'lmlc-fonts' stylesheet dependency so the card renders on-brand
 * regardless of the host page's fonts.
 * ========================================================================== */
.lmlc-card__name,
.lmlc-card__balance,
.lmlc-card__balance--money,
.lmlc-card__cta-headline,
.lmlc-card__cta-subhead,
.lmlc-install__title,
.lmlc-help-modal__title,
.lmlc-history-modal__title,
.lmlc-history-row__head {
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* =========================================================================
 * Loyalty login page (the card's "Log In" button target). A clean, centered
 * email + password form — no Google, no wp-login.php round-trip.
 * ====================================================================== */
.lmlc-loginpage {
    display: flex;
    justify-content: center;
    padding: 32px 16px;
}
.lmlc-loginpage__card {
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    padding: 28px 26px 24px;
    border-radius: var(--lmlc-radius);
    background: var(--lmlc-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    color: var(--lmlc-text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.lmlc-loginpage__head { margin-bottom: 18px; }
.lmlc-loginpage__title {
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--lmlc-text);
}
.lmlc-loginpage__sub {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--lmlc-text-muted);
}

/* The form itself (shared markup with the inline version). */
.lmlc-login { display: flex; flex-direction: column; gap: 12px; }
.lmlc-login__input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--lmlc-text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* 16px so iOS Safari never auto-zooms (and gets stuck) on focus. */
    font-size: 16px;
}
.lmlc-login__input::placeholder { color: rgba(255, 255, 255, 0.5); }
.lmlc-login__input:focus {
    outline: none;
    border-color: var(--lmlc-teal);
    box-shadow: 0 0 0 3px rgba(30, 176, 172, 0.25);
}
/* The submit reuses .lmlc-card__btn, but here it must be full-width, not a
   flex-row sibling — so reset the flex sizing. */
.lmlc-login__submit { flex: none; width: 100%; margin-top: 6px; }

.lmlc-login__err {
    background: rgba(220, 80, 80, 0.15);
    border: 1px solid rgba(220, 80, 80, 0.4);
    color: #ffd7d7;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 13px;
    margin-bottom: 12px;
}
.lmlc-login__forgot {
    display: inline-block;
    margin-top: 14px;
    color: var(--lmlc-text-muted);
    font-size: 13px;
    text-decoration: underline;
}
.lmlc-login__forgot:hover { color: var(--lmlc-text); }
.lmlc-loginpage__signup {
    margin-top: 14px;
    font-size: 13px;
    color: var(--lmlc-text-muted);
}
.lmlc-loginpage__signup a { color: var(--lmlc-teal); text-decoration: underline; }

/* iOS tap-to-zoom guard for every loyalty form control (card, account, help,
   and the login page). */
.lmlc-card input, .lmlc-card select, .lmlc-card textarea,
.lmlc-loginpage input, .lmlc-loginpage select, .lmlc-loginpage textarea { font-size: 16px; }

/* =========================================================================
   ONLINE ORDERS — v1.9.0. Button stacks under History (top-left); the modal
   reuses the lmlc-history-modal classes wholesale, so only the button
   position, order rows, and status pills are defined here.
   ========================================================================= */
.lmlc-card__orders-btn {
    position: absolute;
    top: 58px; /* directly under the 36px History button at top:14px + 8px gap */
    left: 14px;
    z-index: 3;
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px 0 10px;
    border-radius: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    background: rgba(10, 20, 20, 0.45);
    color: var(--lmlc-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: transform 0.15s ease, box-shadow 0.15s ease,
        background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.lmlc-card__orders-btn:hover,
.lmlc-card__orders-btn:focus-visible {
    color: var(--lmlc-teal);
    border-color: var(--lmlc-teal);
    box-shadow: 0 0 18px var(--lmlc-teal-glow);
    outline: none;
}

.lmlc-order-row {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    list-style: none;
}
.lmlc-order-row:last-child { border-bottom: 0; }

.lmlc-order-row__top {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.lmlc-order-row__num  { font-weight: 700; color: var(--lmlc-teal); }
.lmlc-order-row__date { font-size: 13px; opacity: 0.7; }
.lmlc-order-row__loc  { font-size: 12px; opacity: 0.6; margin-top: 2px; }

.lmlc-order-pill {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.lmlc-order-pill--progress  { background: rgba(99, 200, 205, 0.18); color: var(--lmlc-teal); }
.lmlc-order-pill--ready     { background: rgba(75, 224, 144, 0.18); color: #4be090; }
.lmlc-order-pill--done      { background: rgba(255, 255, 255, 0.1);  color: rgba(255, 255, 255, 0.75); }
.lmlc-order-pill--cancelled { background: rgba(255, 107, 107, 0.15); color: #ff8b93; }

.lmlc-order-row__items {
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 13px;
    opacity: 0.9;
}
.lmlc-order-row__items li { margin: 2px 0; }
.lmlc-order-row__total { margin-top: 6px; font-weight: 700; }

/* v1.9.1 portal mode: with points History hidden, My Orders takes the top
   slot instead of floating below an empty space. */
.lmlc-card--portal .lmlc-card__orders-btn { top: 14px; }

/* v1.9.2: BRB notice — shown where the points balance sits while the
   loyalty program display is paused. Frosted panel, teal wrench, calm. */
.lmlc-card__brb {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 14px 0;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid rgba(99, 200, 205, 0.45);
    background: rgba(10, 20, 20, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.lmlc-card__brb-icon {
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    color: var(--lmlc-teal);
}
.lmlc-card__brb-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--lmlc-text);
}
