/* TheraConnect — auth-mobile.css */
/* Mobile shell styles for auth pages (login, register, reset). */
/* Scoped under #authMobile with .am-* prefix. */

/* ═══ Show/hide toggle ═══ */
#authMobile { display: none; }

@media (max-width: 900px) {
    #authMobile { display: flex; flex-direction: column; min-height: 100vh; }
    .auth-split,
    .main-header,
    .main-footer,
    .cookie-bar { display: none !important; }
}

/* ═══ Header gradient ═══ */
.am-header {
    background: var(--m-gradient);
    padding: 20px 20px 24px;
    text-align: center;
    position: relative;
    flex-shrink: 0;
}
.am-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.am-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
}
.am-logo-icon {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.18);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.am-logo span { color: var(--m-accent); }
.am-header-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}
.am-brand-text {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    line-height: 1.5;
    max-width: 280px;
    margin: 0 auto;
}

/* ═══ Body / scrollable area ═══ */
.am-body {
    flex: 1;
    background: var(--m-bg);
    padding: 20px 16px 40px;
    overflow-y: auto;
}

/* ═══ Card ═══ */
.am-card {
    background: var(--m-card);
    border-radius: var(--m-r);
    padding: 24px 20px;
    box-shadow: var(--m-shadow);
    max-width: 420px;
    margin: 0 auto;
}
.am-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--m-text);
    margin: 0 0 4px;
}
.am-card-subtitle {
    font-size: 13px;
    color: var(--m-text-sec);
    margin: 0 0 20px;
}

/* ═══ Form elements ═══ */
.am-form-group {
    margin-bottom: 14px;
}
.am-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--m-text);
    margin-bottom: 6px;
}
.am-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--m-border);
    border-radius: var(--m-r-sm);
    font-size: 15px;
    font-family: inherit;
    background: var(--m-card);
    color: var(--m-text);
    transition: border-color 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.am-input:focus {
    outline: none;
    border-color: var(--m-primary);
    box-shadow: 0 0 0 3px var(--m-primary-soft);
}
.am-input.am-error {
    border-color: var(--m-danger);
}
.am-select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--m-border);
    border-radius: var(--m-r-sm);
    font-size: 15px;
    font-family: inherit;
    background: var(--m-card);
    color: var(--m-text);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23636366' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.am-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--m-border);
    border-radius: var(--m-r-sm);
    font-size: 15px;
    font-family: inherit;
    background: var(--m-card);
    color: var(--m-text);
    resize: vertical;
    min-height: 70px;
    box-sizing: border-box;
}
.am-textarea:focus {
    outline: none;
    border-color: var(--m-primary);
}
.am-field-error {
    font-size: 12px;
    color: var(--m-danger);
    margin-top: 4px;
    display: none;
}
.am-field-error.visible {
    display: block;
}

/* ═══ Primary button ═══ */
.am-btn {
    width: 100%;
    padding: 14px 0;
    border-radius: var(--m-r-sm);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
}
.am-btn:active { opacity: 0.85; }
.am-btn-primary {
    background: var(--m-primary);
    color: var(--m-btn-color);
}
.am-btn-outline {
    background: transparent;
    color: var(--m-primary);
    border: 1.5px solid var(--m-primary);
}

/* ═══ Links ═══ */
.am-link {
    color: var(--m-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}
.am-link:hover { text-decoration: underline; }
.am-forgot-row {
    text-align: right;
    margin-bottom: 16px;
}
.am-footer-links {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--m-text-sec);
}
.am-footer-links a {
    color: var(--m-primary);
    text-decoration: none;
    font-weight: 600;
}

/* ═══ Tabs (patient / specialist) ═══ */
.am-tabs {
    display: flex;
    background: var(--m-bg);
    border-radius: 20px;
    padding: 3px;
    margin-bottom: 20px;
}
.am-tab {
    flex: 1;
    padding: 9px 0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    background: transparent;
    color: var(--m-text-sec);
    font-family: inherit;
    transition: all 0.2s;
}
.am-tab.active {
    background: var(--m-card);
    color: var(--m-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ═══ Step wizard ═══ */
.am-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 20px;
    padding: 0 8px;
}
.am-step {
    flex: 1;
    text-align: center;
    position: relative;
    font-size: 11px;
    font-weight: 600;
    color: var(--m-text-muted);
}
.am-step-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--m-border);
    color: var(--m-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 4px;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s;
}
.am-step.active .am-step-num {
    background: var(--m-primary);
    color: var(--m-btn-color);
}
.am-step.done .am-step-num {
    background: var(--m-primary);
    color: var(--m-btn-color);
}
.am-step.active { color: var(--m-primary); }
.am-step.done { color: var(--m-primary); }
.am-step::after {
    content: '';
    position: absolute;
    top: 14px;
    left: calc(50% + 18px);
    width: calc(100% - 36px);
    height: 2px;
    background: var(--m-border);
}
.am-step:last-child::after { display: none; }
.am-step.done::after { background: var(--m-primary); }

/* ═══ Specialty chips ═══ */
.am-spec-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.am-spec-chip {
    padding: 7px 12px;
    border-radius: 18px;
    border: 1.5px solid var(--m-border);
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--m-text-sec);
    font-family: inherit;
    transition: 0.2s;
}
.am-spec-chip.on {
    border-color: var(--m-primary);
    background: var(--m-primary-soft);
    color: var(--m-primary);
}

/* ═══ Toggle switch ═══ */
.am-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--m-border);
}
.am-toggle-row:last-of-type { border-bottom: none; }
.am-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--m-text);
}
.am-toggle {
    width: 44px; height: 26px;
    border-radius: 13px;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    background: var(--m-border);
    position: relative;
    transition: all 0.2s;
}
.am-toggle.on { background: var(--m-primary); }
.am-toggle::after {
    content: '';
    width: 20px; height: 20px;
    border-radius: 10px;
    background: #fff;
    position: absolute;
    top: 3px; left: 3px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.am-toggle.on::after { left: 21px; }

/* ═══ Avatar selector ═══ */
.am-avatar-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 8px 0;
}
.am-avatar-opt {
    width: 52px; height: 52px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    cursor: pointer;
    overflow: hidden;
    transition: 0.2s;
    flex-shrink: 0;
}
.am-avatar-opt img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.am-avatar-opt.selected {
    border-color: var(--m-primary);
    box-shadow: 0 0 0 3px var(--m-primary-soft);
}

/* ═══ Button row (back + next) ═══ */
.am-btn-row {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}
.am-btn-row > * { flex: 1; }

/* ═══ Success message ═══ */
.am-success {
    text-align: center;
    padding: 20px 0;
    color: var(--m-primary);
    font-weight: 600;
    font-size: 14px;
}
.am-success i {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

/* ═══ Hint text ═══ */
.am-hint {
    font-size: 11px;
    color: var(--m-text-muted);
    margin-bottom: 6px;
}

/* ═══ Small mobile (375px and below) — fit header controls ═══ */
@media (max-width: 400px) {
    .am-header { padding: 14px 12px 20px; }
    .am-header-top { gap: 6px; }
    .am-logo { font-size: 15px; gap: 6px; }
    .am-logo-icon { width: 28px; height: 28px; font-size: 14px; border-radius: 8px; }
    .am-header-controls { gap: 4px; }
    [data-mobile-theme] .m-theme-btn { padding: 3px 6px; font-size: 9px; }
    [data-mobile-theme] .m-lang-btn { padding: 3px 6px; font-size: 9px; }
}
