/* Extensions Store — auth modal + header user widget (self-contained, global). */

/* modal shell */
.exst-auth{position:fixed;inset:0;z-index:99996;background:rgba(15,23,42,.55);display:flex;align-items:center;justify-content:center;padding:20px;}
.exst-auth[hidden]{display:none;}
.exst-auth .exst-modal__box{background:#fff;border-radius:16px;width:100%;max-width:400px;padding:26px;position:relative;box-shadow:0 30px 70px rgba(15,23,42,.35);font-family:inherit;}
.exst-auth .exst-modal__close{position:absolute;top:14px;right:16px;width:34px;height:34px;border:0;border-radius:50%;background:#f1f5f9;color:#475569;font-size:21px;cursor:pointer;}
.exst-auth .exst-modal__close:hover{background:#e2e8f0;}

/* switch */
.exst-auth__switch{display:flex;background:#f1f5f9;border-radius:10px;padding:4px;margin:4px 0 18px;}
.exst-auth__switch button{flex:1;border:0;background:none;padding:9px;border-radius:8px;font-weight:700;font-size:14px;color:#64748b;cursor:pointer;}
.exst-auth__switch button.is-active{background:#fff;color:#0f172a;box-shadow:0 1px 4px rgba(15,23,42,.1);}

/* fields */
.exst-auth .exst-field{display:block;margin-bottom:14px;}
.exst-auth .exst-field span{display:block;font-weight:600;font-size:13px;margin-bottom:5px;color:#0f172a;}
.exst-auth .exst-field input{width:100%;border:1px solid #e6eaf0;border-radius:10px;padding:11px 13px;font:inherit;box-sizing:border-box;}
.exst-auth__agree{margin:6px 0 14px;}
.exst-auth .exst-checkrow{display:grid;grid-template-columns:auto 1fr;column-gap:9px;row-gap:3px;align-items:start;font-size:13px;color:#334155;margin-bottom:10px;line-height:1.45;}
.exst-auth .exst-checkrow input{margin-top:3px;grid-column:1;grid-row:1;}
.exst-auth .exst-checkrow > span{grid-column:2;grid-row:1;}
.exst-auth .exst-checkrow .exst-fielderr{grid-column:2;grid-row:2;margin-top:0;}
.exst-auth .exst-checkrow a{color:#4F46E5;}
.exst-auth .exst-btn{width:100%;text-align:center;border:0;cursor:pointer;font-size:15px;font-weight:700;padding:13px;border-radius:11px;background:#4F46E5;color:#fff;}
.exst-auth .exst-btn:hover{background:#4338ca;}
.exst-auth__result{margin-top:12px;padding:10px 13px;border-radius:10px;font-size:13px;}
.exst-auth__result.err{background:#fee2e2;color:#b91c1c;}

/* header user widget */
.exst-user{position:relative;display:inline-block;}
.exst-user__btn{width:42px;height:42px;border-radius:50%;border:1.5px solid #e6eaf0;background:#fff;color:#0f172a;display:grid;place-items:center;cursor:pointer;transition:border-color .15s,background .15s;}
.exst-user__btn:hover{border-color:#4F46E5;color:#4F46E5;}
.exst-user__menu{position:absolute;top:50px;right:0;min-width:170px;background:#fff;border:1px solid #e6eaf0;border-radius:12px;box-shadow:0 18px 40px rgba(15,23,42,.16);padding:6px;opacity:0;visibility:hidden;transform:translateY(-6px);transition:opacity .15s,transform .15s,visibility .15s;z-index:50;}
.exst-user:hover .exst-user__menu,.exst-user.is-open .exst-user__menu{opacity:1;visibility:visible;transform:translateY(0);}
.exst-user__name{display:block;padding:8px 12px 6px;font-size:12px;color:#94a3b8;border-bottom:1px solid #f1f5f9;margin-bottom:4px;}
.exst-user__menu a{display:block;padding:9px 12px;text-decoration:none;color:#0f172a;font-weight:600;font-size:14px;border-radius:8px;}
.exst-user__menu a:hover{background:#f6f8fb;color:#4F46E5;}

/* validation states */
.exst-auth__result.ok{background:#dcfce7;color:#047857;}
.exst-auth .exst-field.is-error input{border-color:#dc2626;background:#fef2f2;}
.exst-auth .exst-checkrow.is-error span{color:#b91c1c;}
.exst-fielderr{display:block;color:#dc2626;font-size:12px;margin-top:5px;font-style:normal;}

/* Keep the close button clear of the Вход/Регистрация switch */
.exst-auth .exst-modal__box{padding-top:30px;}
.exst-auth .exst-modal__close{top:12px;right:12px;width:32px;height:32px;font-size:20px;z-index:3;}
.exst-auth__switch{margin-top:26px;}

/* Recovery panel */
.exst-auth__recover-link{margin:-4px 0 10px;text-align:right;}
.exst-auth__forgot{font-size:13px;color:#64748b;text-decoration:none;border-bottom:1px dashed currentColor;}
.exst-auth__forgot:hover{color:var(--exst-accent,#4F46E5);}
.exst-auth__recover{padding-top:4px;}
.exst-auth__back{background:none;border:0;color:#64748b;cursor:pointer;font-size:13px;padding:0;margin-bottom:10px;}
.exst-auth__back:hover{color:var(--exst-accent,#4F46E5);}
.exst-auth__recover-title{margin:0 0 6px;font-size:20px;}
.exst-auth__recover-hint{margin:0 0 14px;color:#64748b;font-size:14px;line-height:1.5;}
.exst-auth__recover-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:4px;}
.exst-auth__recover-actions .exst-btn{flex:1 1 0;justify-content:center;}
.exst-auth__recover-actions .exst-btn--ghost{color:var(--exst-accent,#4F46E5);border:1px solid var(--exst-accent,#4F46E5);background:#fff;font-weight:700;}
.exst-auth__recover-actions .exst-btn--ghost:hover{background:#f5f6ff;color:var(--exst-accent,#4F46E5);}
@media (max-width:520px){
	.exst-auth__recover-actions{flex-direction:column;}
	.exst-auth__recover-actions .exst-btn{flex:1 1 auto;width:100%;}
}
