/* Modal / dialog chrome — ported from featherlight-overrides, adapted for <dialog>. */

dialog.kirac-dialog {
    border: 0;
    padding: 0;
    max-width: 440px;
    width: min(100%, 440px);
    background: transparent;
    color: inherit;
    overflow: visible;
}

dialog.kirac-dialog::backdrop {
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(6px);
}

html[data-theme="dark"] dialog.kirac-dialog::backdrop {
    background: rgba(0, 0, 0, 0.88);
}

dialog.kirac-dialog .kirac-dialog-shell {
    position: relative;
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    font-family: var(--font-sans);
}

html[data-theme="light"] dialog.kirac-dialog .kirac-dialog-shell {
    color-scheme: light;
}

html[data-theme="dark"] dialog.kirac-dialog .kirac-dialog-shell {
    color-scheme: dark;
}

.kirac-dialog-close-form {
    margin: 0;
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
}

.kirac-dialog-x {
    width: 36px;
    height: 36px;
    line-height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 22px;
    font-weight: 400;
    font-family: var(--font-sans);
    cursor: pointer;
    opacity: 0.85;
}

.kirac-dialog-x:hover {
    opacity: 1;
    color: var(--color-text);
}

.lander-modal {
    padding: clamp(1.5rem, 4vmin, 2rem);
    padding-top: clamp(1.75rem, 4.5vmin, 2.25rem);
    font-family: var(--font-sans);
}

.lander-modal-notify {
    text-align: center;
}

.lander-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    border: 1px solid var(--color-border);
    background: var(--color-surface-muted);
    color: var(--color-text);
    font-size: 22px;
}

.lander-modal-icon .fa-solid,
.lander-modal-icon .fa-regular {
    color: inherit;
}

.lander-modal-eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
}

.lander-modal-title {
    margin: 0 0 12px;
    font-family: var(--font-sans);
    font-size: clamp(1.35rem, 3.5vmin, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--color-text);
}

.lander-modal-lead {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--color-text-muted);
}

.lander-modal-lead strong {
    color: var(--color-text);
    font-weight: 600;
}

.lander-modal-list {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    font-size: 15px;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.lander-modal-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.lander-modal-list li:first-child {
    padding-top: 0;
}

.lander-modal-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.lander-modal-list strong {
    color: var(--color-text);
}

.lander-modal-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lander-modal-label {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
}

.lander-modal-form input[type="email"],
.lander-modal-form input[type="password"],
.lander-modal-form input[type="text"],
.lander-modal-form input:not([type]) {
    width: 100%;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--color-border-strong);
    background: var(--color-surface-muted);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.4;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

.lander-modal-form input::placeholder {
    color: var(--color-text-subtle);
}

.lander-modal-form input:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 0;
    border-color: var(--color-accent);
}

.lander-modal-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
    padding: 15px 20px;
    border: 0;
    background: var(--color-accent);
    color: var(--color-on-accent);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: var(--font-sans);
}

a.lander-modal-submit {
    color: var(--color-on-accent);
}

.lander-modal-submit:hover {
    background: var(--color-accent-hover);
}

.lander-modal-submit.lander-button-secondary {
    margin-top: 8px;
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border-strong);
}

a.lander-modal-submit.lander-button-secondary {
    color: var(--color-text);
}

.lander-modal-submit.lander-button-secondary:hover {
    background: var(--color-dropdown-hover);
}

.lander-modal-textbtn {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-link);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.lander-modal-textbtn:hover {
    color: var(--color-text);
}

.lander-modal-error {
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid #c44;
    background: var(--color-surface-muted);
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.45;
}

.auth-providers {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.25rem 0 0;
}

.lander-modal-submit i {
    color: inherit;
    font-size: 1em;
}

.lander-modal form + .lander-modal-submit {
    margin-top: 16px;
}

.lander-modal-footnote {
    margin: 20px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.lander-modal-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0 16px;
    color: var(--color-text-subtle);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lander-modal-divider::before,
.lander-modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.lander-modal-alt {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--color-text-muted);
}

.lander-modal-alt a {
    color: var(--color-link);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.lander-modal-alt a:hover {
    color: var(--color-text);
}

@media (max-width: 768px) {
    dialog.kirac-dialog {
        width: calc(100% - 24px);
        max-width: none;
        margin: auto 12px;
    }

    .lander-modal {
        padding: 1.25rem;
        padding-top: 1.5rem;
    }
}
