/* Auth Modal — standalone styles (extracted from document-viewer.css) */

:root {
    --primary-color: #E8703A;
    --primary-dark:  #C8572A;
    --primary-soft:  rgba(232, 112, 58, 0.10);
    --success-color: #2D9E6B;
    --purple-color:  #1A2540;
    --danger-color:  #D94F4F;
    --bg-primary:    #ffffff;
    --bg-secondary:  #F6F4F0;
    --bg-tertiary:   #F0EDE8;
    --border-color:  #E4DDD4;
    --text-primary:  #1A1917;
    --text-secondary:#4A4540;
    --text-tertiary: #9A928A;
    --shadow-sm: 0 1px 3px rgba(26,25,23,0.06), 0 1px 2px rgba(26,25,23,0.04);
    --shadow-md: 0 4px 12px rgba(26,25,23,0.08), 0 2px 4px rgba(26,25,23,0.04);
}

.auth-modal.modal-content {
    padding: 0;
    max-width: 400px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}
.auth-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border: none;
    background: var(--bg-secondary);
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 150ms, color 150ms;
    z-index: 1;
}
.auth-modal-close:hover { background: var(--border-color); color: var(--text-primary); }

.auth-tabs { display:flex; border-bottom:1px solid var(--border-color); padding:0 24px; }
.auth-tab { flex:1; text-align:center; padding:18px 0 14px; font-size:14px; font-weight:500; font-family:inherit; color:var(--text-tertiary); background:none; border:none; border-bottom:2px solid transparent; cursor:pointer; text-decoration:none; transition:color 150ms,border-color 150ms; margin-bottom:-1px; }
.auth-tab:hover { color:var(--text-primary); }
.auth-tab.auth-tab--active { color:var(--primary-color); border-bottom-color:var(--primary-color); font-weight:600; }

.auth-body { padding:28px 24px 28px; }

.oauth-buttons { display:flex; flex-direction:column; gap:9px; margin-bottom:18px; }
.oauth-btn { display:flex; align-items:center; justify-content:center; position:relative; padding:10px 16px; border-radius:10px; border:1.5px solid var(--border-color); background:var(--bg-primary); font-size:14px; font-weight:500; font-family:inherit; color:var(--text-primary); text-decoration:none; cursor:pointer; transition:background 150ms,border-color 150ms,box-shadow 150ms; user-select:none; }
.oauth-btn:hover { background:var(--bg-secondary); box-shadow:var(--shadow-sm); }
.oauth-btn--google:hover { border-color:#4285F4; }
.oauth-btn--yandex:hover { border-color:#FC3F1D; }
.oauth-btn--vk:hover     { border-color:#0077FF; }
.oauth-btn-icon { position:absolute; left:14px; width:22px; height:22px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.oauth-btn-icon svg { width:22px; height:22px; }
.oauth-btn-label { font-weight:500; }

.auth-divider { display:flex; align-items:center; gap:12px; margin:20px 0 16px; color:var(--text-tertiary); font-size:12px; }
.auth-divider::before, .auth-divider::after { content:''; flex:1; height:1px; background:var(--border-color); }

.auth-form .form-group { margin-bottom:10px; }
.auth-input { width:100%; padding:10px 13px; border:1.5px solid var(--border-color); border-radius:8px; font-size:14px; font-family:inherit; background:var(--bg-primary); color:var(--text-primary); outline:none; transition:border-color 150ms,box-shadow 150ms; box-sizing:border-box; }
.auth-input:focus { border-color:var(--primary-color); box-shadow:0 0 0 3px var(--primary-soft); }
.auth-input::placeholder { color:var(--text-tertiary); }
.auth-form .password-input { position:relative; }
.auth-form .password-input .auth-input { padding-right:44px; }
.auth-form .password-toggle { position:absolute; right:12px; top:50%; transform:translateY(-50%); background:none; border:none; padding:0; cursor:pointer; color:var(--text-tertiary); transition:color 150ms; }
.auth-form .password-toggle:hover { color:var(--text-primary); }

.auth-submit { width:100%; padding:11px; background:var(--text-primary); color:#fff; border:none; border-radius:8px; font-size:14px; font-weight:600; font-family:inherit; cursor:pointer; margin-top:8px; box-shadow:var(--shadow-sm); transition:background 150ms,box-shadow 150ms,transform 150ms; }
.auth-submit:hover:not(:disabled) { background:var(--purple-color); box-shadow:var(--shadow-md); transform:translateY(-1px); }
.auth-submit:disabled { opacity:0.5; cursor:default; box-shadow:none; transform:none; }

.auth-form .form-error, .auth-error { color:var(--danger-color); font-size:13px; margin-top:6px; margin-bottom:4px; line-height:1.4; }
.auth-error--banner:not(:empty) { display:flex; align-items:center; gap:8px; margin-top:12px; padding:10px 12px; background:color-mix(in srgb, var(--danger-color) 8%, transparent); border:1px solid color-mix(in srgb, var(--danger-color) 25%, transparent); border-radius:8px; font-size:13px; line-height:1.45; }

.auth-form .form-group--checkbox .checkbox-label { display:flex; align-items:flex-start; gap:8px; font-size:13px; color:var(--text-secondary); cursor:pointer; line-height:1.4; }
.auth-form .form-group--checkbox .checkbox-label input { margin-top:2px; flex-shrink:0; }
.auth-form .form-group--checkbox .checkbox-label a { color:var(--primary-color); text-decoration:none; }

.auth-gift-note { font-size:13px; color:var(--text-tertiary); text-align:center; margin-top:10px; }

.auth-step-header { display:flex; align-items:center; gap:8px; margin-bottom:16px; }
.auth-step-title { font-size:18px; font-weight:700; color:var(--text-primary); letter-spacing:-0.3px; margin:0; }
.auth-back-btn { background:none; border:none; font-size:18px; line-height:1; cursor:pointer; color:var(--text-tertiary); padding:4px 8px; border-radius:6px; transition:background 150ms,color 150ms; flex-shrink:0; }
.auth-back-btn:hover { background:var(--bg-tertiary); color:var(--text-primary); }

.auth-email-display { font-size:13px; color:var(--text-tertiary); margin:0 0 14px; word-break:break-all; }
.auth-forgot-wrap { text-align:center; margin-top:12px; }
.auth-forgot-link { font-size:13px; color:var(--text-secondary); text-decoration:none; transition:color 150ms; }
.auth-forgot-link:hover { color:var(--primary-color); }

.auth-reset-desc { font-size:13px; color:var(--text-secondary); margin:0 0 18px; line-height:1.55; }
.auth-reset-desc a { color:var(--primary-color); text-decoration:none; }
.auth-reset-desc a:hover { text-decoration:underline; }

.auth-code-wrap { display:flex; gap:10px; justify-content:center; margin-bottom:16px; }
.auth-code-digit { width:58px; height:62px; text-align:center; font-size:26px; font-weight:700; font-family:inherit; border:1.5px solid var(--border-color); border-radius:10px; outline:none; color:var(--text-primary); background:var(--bg-primary); transition:border-color 150ms,box-shadow 150ms; -moz-appearance:textfield; }
.auth-code-digit::-webkit-outer-spin-button, .auth-code-digit::-webkit-inner-spin-button { -webkit-appearance:none; }
.auth-code-digit:focus { border-color:var(--primary-color); box-shadow:0 0 0 3px var(--primary-soft); }

.auth-resend-wrap { text-align:center; margin-top:6px; min-height:1.4em; }
.auth-resend-link { font-size:13px; color:var(--primary-color); text-decoration:none; cursor:pointer; }
.auth-resend-link:hover { text-decoration:underline; }
.auth-resend-timer { font-size:13px; color:var(--text-tertiary); }

.auth-consent-text { font-size:12px; color:var(--text-tertiary); text-align:center; margin-top:14px; line-height:1.55; }
.auth-consent-text a { color:var(--text-secondary); text-decoration:underline; }
.auth-consent-text a:hover { color:var(--text-primary); }

.auth-other-methods-toggle { display:block; width:100%; background:none; border:none; color:var(--primary-color); font-size:13px; font-family:inherit; text-align:center; cursor:pointer; padding:6px; transition:color 150ms; }
.auth-other-methods-toggle:hover { color:var(--primary-dark); }
.am-toggle-arrow { display:inline-block; font-size:0.72em; margin-left:4px; vertical-align:middle; }
#am-other-methods { margin-top:8px; }

.auth-email-available { color:var(--success-color); font-weight:600; font-size:14px; margin:0 0 14px; }

.auth-checkbox-label { display:flex; align-items:flex-start; gap:10px; font-size:13px; color:var(--text-secondary); line-height:1.45; cursor:pointer; margin-bottom:18px; }
.auth-checkbox-label a { color:var(--primary-color); text-decoration:none; }
.auth-checkbox-label a:hover { text-decoration:underline; }
.auth-checkbox-label input[type="checkbox"] { flex-shrink:0; width:16px; height:16px; margin-top:2px; cursor:pointer; accent-color:var(--primary-color); }

.consent-age-row { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--border-color); margin-bottom:14px; cursor:pointer; }
.consent-age-row input[type="checkbox"] { flex-shrink:0; width:16px; height:16px; accent-color:var(--primary-color); cursor:pointer; }
.consent-age-row span { font-size:14px; font-weight:600; color:var(--text-primary); }

.consent-legal-group { background:var(--bg-secondary); border:1px solid var(--border-color); border-radius:10px; padding:12px 14px; margin-bottom:16px; }
.consent-legal-title { font-size:10px; font-weight:700; letter-spacing:0.09em; text-transform:uppercase; color:var(--text-tertiary); margin:0 0 10px; }
.consent-legal-group .auth-checkbox-label { font-size:12px; margin-bottom:9px; color:var(--text-tertiary); }
.consent-legal-group .auth-checkbox-label:last-child { margin-bottom:0; }
.consent-legal-group .auth-checkbox-label a { color:var(--text-secondary); }
.consent-legal-group .auth-checkbox-label input[type="checkbox"] { width:14px; height:14px; margin-top:1px; }

.am-overlay { position:absolute; inset:0; z-index:10; background:rgba(246,244,240,0.88); backdrop-filter:blur(3px); display:flex; flex-direction:column; align-items:center; justify-content:center; border-radius:inherit; gap:14px; }
.am-spinner { width:34px; height:34px; border:2.5px solid var(--border-color); border-top-color:var(--primary-color); border-radius:50%; animation:am-spin 0.7s linear infinite; }
@keyframes am-spin { to { transform:rotate(360deg); } }
.am-overlay-text { font-size:13px; color:var(--text-secondary); margin:0; text-align:center; }

@keyframes am-step-in { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
.am-step-enter { animation:am-step-in 0.28s cubic-bezier(0.25,0.46,0.45,0.94) both; }
