/* Shared sign-in modal used by both the remote-control SPA and the
   template-store SPA. Scoped to .auth-modal-* so it doesn't collide with
   either page's existing modal CSS. Dark theme tuned to match both
   palettes (matches --bg / --text from style.css and --tpl-bg / --tpl-fg
   from templates.css — both share the same values today). */

.auth-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}
.auth-modal-backdrop.hidden { display: none; }

.auth-modal-card {
    background: #1c1f27;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    max-width: 360px;
    width: 100%;
    padding: 28px 24px 24px;
    color: #fafafa;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.auth-modal-title {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.auth-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-modal-body p {
    margin: 0;
    font-size: 13px;
    color: #cfcfd3;
    line-height: 1.5;
}

.auth-modal-google {
    background: #fafafa;
    color: #111;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 120ms ease;
}
.auth-modal-google:hover { background: #fff; }
.auth-modal-google:disabled { opacity: 0.5; cursor: default; }
.auth-modal-google svg { width: 18px; height: 18px; }

.auth-modal-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6e6f76;
    font-size: 12px;
    margin: 4px 0;
}
.auth-modal-divider::before,
.auth-modal-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-modal-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #cfcfd3;
}

.auth-modal-input {
    background: #141720;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 12px;
    color: #fafafa;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.auth-modal-input:focus {
    outline: 2px solid #6BA292;
    outline-offset: 1px;
    border-color: transparent;
}
.auth-modal-input:disabled { opacity: 0.5; }

.auth-modal-submit {
    background: #6BA292;
    color: #111;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 120ms ease;
    margin-top: 4px;
}
.auth-modal-submit:hover { background: #7fb6a6; }
.auth-modal-submit:disabled { opacity: 0.5; cursor: default; }

.auth-modal-link {
    background: none;
    border: none;
    color: #6BA292;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    padding: 8px 0 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-family: inherit;
}
.auth-modal-link:hover { color: #7fb6a6; }
.auth-modal-link:disabled { opacity: 0.5; cursor: default; }

.auth-modal-cancel {
    background: none;
    border: none;
    color: #a8a9ae;
    cursor: pointer;
    font-size: 12px;
    text-align: center;
    padding: 6px 0 0;
    font-family: inherit;
}
.auth-modal-cancel:hover { color: #cfcfd3; }

/* Inline error/success line that flashes below the form. is-error tints
   red, is-success tints green. */
.auth-modal-status {
    font-size: 12px;
    text-align: center;
    min-height: 16px;
    margin-top: 2px;
}
.auth-modal-status.is-error { color: #f8a4a4; }
.auth-modal-status.is-success { color: #98c9b8; }
