/**
 * Contact Modal — Phase 3 sitewide help-presence layer.
 *
 * Centered modal on desktop (max 480px), bottom-sheet on mobile <640px.
 */

.aor-contact-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.aor-contact-modal[hidden] { display: none; }

.aor-contact-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 8, 18, 0.65);
    backdrop-filter: blur(4px);
    animation: aor-contact-fade-in 200ms ease;
}

.aor-contact-modal-panel {
    position: relative;
    background: linear-gradient(135deg, #0a1929 0%, #050d18 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    color: #fff;
    animation: aor-contact-slide-up 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes aor-contact-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes aor-contact-slide-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.aor-contact-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.aor-contact-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.aor-contact-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    transition: color 150ms ease;
}

.aor-contact-modal-close:hover { color: #fff; }

.aor-contact-modal-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
}

/* Options list */

.aor-contact-modal-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aor-contact-modal-fullpage {
    margin: 14px 0 0;
    text-align: center;
    font-size: 0.85rem;
}
.aor-contact-modal-fullpage a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.15s;
}
.aor-contact-modal-fullpage a:hover,
.aor-contact-modal-fullpage a:focus-visible {
    color: var(--aor-cyan);
    text-decoration: underline;
}

.aor-contact-modal-option {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
    text-align: left;
    width: 100%;
    font: inherit;
}

.aor-contact-modal-option-button {
    /* button reset */
    appearance: none;
}

.aor-contact-modal-option:hover {
    background: rgba(0, 200, 255, 0.08);
    border-color: rgba(0, 200, 255, 0.30);
    transform: translateY(-1px);
}

.aor-contact-modal-option-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 200, 255, 0.10);
    color: #00c8ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aor-contact-modal-option-content {
    flex: 1;
    min-width: 0;
}

.aor-contact-modal-option-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.aor-contact-modal-option-detail {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    font-family: ui-monospace, "SF Mono", monospace;
}

.aor-contact-modal-option-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

/* Form */

.aor-contact-modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.aor-contact-modal-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.aor-contact-modal-field input,
.aor-contact-modal-field textarea {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 150ms ease, background 150ms ease;
}

.aor-contact-modal-field input:focus,
.aor-contact-modal-field textarea:focus {
    outline: none;
    border-color: #00c8ff;
    background: rgba(0, 200, 255, 0.06);
}

.aor-contact-modal-field textarea {
    resize: vertical;
    min-height: 80px;
}

.aor-contact-modal-submit {
    margin-top: 4px;
    background: linear-gradient(180deg, #00c8ff 0%, #0099cc 100%);
    color: #001624;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: filter 150ms ease, transform 150ms ease;
}

.aor-contact-modal-submit:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.aor-contact-modal-submit:disabled {
    opacity: 0.5;
    cursor: wait;
}

.aor-contact-modal-form-error {
    margin: 0;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ff8a8a;
    font-size: 13px;
}

/* Success state */

.aor-contact-modal-success {
    text-align: center;
    padding: 20px 0 8px;
}

.aor-contact-modal-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
    color: #001624;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 0 24px rgba(74, 222, 128, 0.3);
}

.aor-contact-modal-success h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #fff;
}

.aor-contact-modal-success p {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
}

.aor-contact-modal-done {
    background: rgba(0, 200, 255, 0.10);
    color: #00c8ff;
    border: 1px solid rgba(0, 200, 255, 0.30);
    padding: 10px 28px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* Mobile bottom-sheet */

@media (max-width: 480px) {
    .aor-contact-modal {
        padding: 0;
        align-items: flex-end;
    }

    .aor-contact-modal-panel {
        max-width: 100%;
        max-height: 92vh;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-radius: 16px 16px 0 0;
        animation: aor-contact-slide-bottom 280ms cubic-bezier(0.4, 0, 0.2, 1);
    }
}

@keyframes aor-contact-slide-bottom {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}
