/* 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__btn{position:relative;overflow:hidden;padding:0;}
/* Gravatar over the default icon (transparent when the user has none). */
.exst-user__grav{position:absolute;inset:0;width:100%;height:100%;border-radius:50%;object-fit:cover;}
.exst-uwrap{position:relative;display:inline-block;}
.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%;}
}

/* Уведомление администратора на вкладке «Регистрация».
   Светло-красная полупрозрачная подложка над полем E-mail. Блока нет, если
   текст не задан, — тогда окно остаётся прежнего размера. */
.exst-auth__notice{
	margin:0 0 16px;
	padding:12px 14px;
	border-radius:10px;
	background:rgba(239,68,68,.09);
	border:1px solid rgba(239,68,68,.28);
	color:#991b1b;
	font-size:14px;
	line-height:1.5;
}
.exst-auth__notice[hidden]{display:none!important;}
.exst-auth__notice > :first-child{margin-top:0;}
.exst-auth__notice > :last-child{margin-bottom:0;}
.exst-auth__notice a{color:#b91c1c;text-decoration:underline;}
.exst-auth__notice ul,.exst-auth__notice ol{margin:8px 0 0;padding-left:20px;}
/* Ширину окна уведомление НЕ меняет. Текст обязан уместиться в неё сам:
   длинные слова и ссылки переносятся, горизонтальной прокрутки быть не должно. */
.exst-auth__notice{
	max-width:100%;
	box-sizing:border-box;
	overflow-wrap:anywhere;   /* рвём даже сплошную длинную строку */
	word-break:break-word;
	overflow-x:hidden;
}
.exst-auth__notice *{
	max-width:100%;
	box-sizing:border-box;
	overflow-wrap:anywhere;
	word-break:break-word;
}
.exst-auth__notice img{height:auto;}
.exst-auth__notice pre,.exst-auth__notice code{white-space:pre-wrap;}
.exst-auth__notice table{width:100%;table-layout:fixed;}
/* Страховка на само окно: никакой горизонтальной полосы прокрутки. */
.exst-modal.exst-auth .exst-modal__box{overflow-x:hidden;}

/* Profile menu: the same white caret as the coin pop-up, pointing at the person icon;
   an invisible bridge keeps the menu open while the pointer crosses the gap. */
.exst-user__menu::before{content:"";position:absolute;top:-7px;right:15px;width:12px;height:12px;background:#fff;border-left:1px solid #e6eaf0;border-top:1px solid #e6eaf0;transform:rotate(45deg);}
/* Opens on the same line as the coin pop-up; the bridge spans the whole gap. */
/* With a coin both pop-ups hang from the SAME box (.exst-uwrap) with the same 14px gap,
   so they always open on one line; the menu stays under the person icon. */
.exst-uwrap.has-coin .exst-user{position:static;}
.exst-uwrap.has-coin .exst-user__menu{top:calc(100% + 14px);right:37px;}
@media (max-width:480px){.exst-uwrap.has-coin .exst-user__menu{right:33px;}}
.exst-user__menu::after{content:"";position:absolute;left:0;right:0;top:-24px;height:24px;}