/* po-otp-front.css - Стили для OTP и 2FA авторизации */

/* Переопределяем отображение форм */
.po-auth-wrapper.woodmart-compatible .po-form-login,
.po-auth-wrapper.woodmart-compatible .woocommerce-form-register.po-form-register,
.po-auth-wrapper.woodmart-compatible .po-form-lost,
.po-auth-wrapper.woodmart-compatible .po-form-verify,
.po-auth-wrapper.woodmart-compatible .po-form-admin-2fa,
.po-auth-wrapper.woodmart-compatible .login.woocommerce-form-login,
.po-auth-wrapper.woodmart-compatible .register.woocommerce-form-register {
    display: none !important;
}

.po-auth-wrapper.woodmart-compatible .po-form-login.active-form,
.po-auth-wrapper.woodmart-compatible .woocommerce-form-register.po-form-register.active-form,
.po-auth-wrapper.woodmart-compatible .po-form-lost.active-form,
.po-auth-wrapper.woodmart-compatible .po-form-verify.active-form,
.po-auth-wrapper.woodmart-compatible .po-form-admin-2fa.active-form {
    display: block !important;
}

/* Табы с крестиком */
.po-auth-wrapper.woodmart-compatible .po-auth-tabs {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    position: relative;
}

.po-auth-wrapper.woodmart-compatible .po-tabs-left {
    display: flex;
    gap: 16px;
}

.po-auth-wrapper.woodmart-compatible .po-tab {
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: #888;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    user-select: none;
}

.po-auth-wrapper.woodmart-compatible .po-tab.active,
.po-auth-wrapper.woodmart-compatible .po-tab:hover {
    color: #222;
}

.po-auth-wrapper.woodmart-compatible .po-tab.active {
    border-bottom-color: #222;
}

.po-auth-wrapper.woodmart-compatible .po-dropdown-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 2px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.po-auth-wrapper.woodmart-compatible .po-dropdown-close:hover {
    color: #111;
}

/* Общие отступы строк формы */
.po-auth-wrapper.woodmart-compatible .form-row {
    margin-bottom: 10px !important;
    padding: 0 !important;
}

/* Поля с иконками */
.po-auth-wrapper.woodmart-compatible .po-input-field {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.po-auth-wrapper.woodmart-compatible .po-input-icon {
    position: absolute !important;
    left: 10px !important;
    width: 16px !important;
    height: 16px !important;
    fill: none !important;
    stroke: #888888 !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    pointer-events: none !important;
    transition: stroke 0.2s ease !important;
    z-index: 3 !important;
}

.po-auth-wrapper.woodmart-compatible .po-input-field .input-text {
    width: 100% !important;
    height: 36px !important;
    padding: 6px 10px 6px 34px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.po-auth-wrapper.woodmart-compatible .po-input-field .input-text:focus {
    border-color: #0b76ef !important;
    box-shadow: 0 0 0 2px rgba(11, 118, 239, 0.1) !important;
}

.po-auth-wrapper.woodmart-compatible .po-input-field .input-text:focus + .po-input-icon,
.po-auth-wrapper.woodmart-compatible .po-input-field:focus-within .po-input-icon {
    stroke: #0b76ef !important;
}

.po-auth-wrapper.woodmart-compatible .po-input-field .input-text:focus::placeholder {
    opacity: 0 !important;
}

/* Блок дополнительных опций входа */
.po-auth-wrapper.woodmart-compatible .po-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
}

.po-auth-wrapper.woodmart-compatible .po-form-actions .woocommerce-form-login__rememberme {
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.po-auth-wrapper.woodmart-compatible .po-form-actions a,
.po-auth-wrapper.woodmart-compatible .woocommerce-LostPassword a {
    color: #0b76ef;
    text-decoration: none;
    font-size: 12px;
}

.po-auth-wrapper.woodmart-compatible .po-form-actions a:hover,
.po-auth-wrapper.woodmart-compatible .woocommerce-LostPassword a:hover {
    text-decoration: underline;
}

/* Кнопка отправки */
.po-auth-wrapper.woodmart-compatible .po-submit-row {
    margin-top: 12px !important;
    margin-bottom: 8px !important;
}

.po-auth-wrapper.woodmart-compatible .button {
    width: 100% !important;
    height: 30px !important;
    background: #222 !important;
    color: #fff !important;
    padding: 0 15px !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
}

.po-auth-wrapper.woodmart-compatible .button:hover {
    background: #444 !important;
}

.po-auth-wrapper.woodmart-compatible .button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Правила и условия */
.po-terms-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px;
    font-size: 12px;
    margin-top: 8px !important;
    margin-bottom: 8px !important;
}

.po-terms-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    cursor: pointer;
}

.po-tooltip-trigger {
    position: relative;
    display: inline-flex;
    cursor: pointer;
    outline: none;
}

.po-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #eee;
    color: #666;
    font-size: 10px;
    font-weight: bold;
    user-select: none;
}

.po-tooltip-trigger:hover .po-tooltip-icon,
.po-tooltip-trigger:focus .po-tooltip-icon,
.po-tooltip-trigger.is-active .po-tooltip-icon {
    background: #222;
    color: #fff;
}

.po-tooltip-content {
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #222;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.3;
    width: 220px;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    pointer-events: none;
}

.po-tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -4px;
    border-width: 4px;
    border-style: solid;
    border-color: #222 transparent transparent transparent;
}

.po-tooltip-trigger:hover .po-tooltip-content,
.po-tooltip-trigger:focus .po-tooltip-content,
.po-tooltip-trigger.is-active .po-tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Социальные кнопки */
.po-auth-wrapper.woodmart-compatible .wd-social-login-wrapper {
    margin-top: 14px;
}

.po-auth-wrapper.woodmart-compatible .wd-login-divider {
    text-align: center;
    margin: 10px 0 14px;
    position: relative;
}

.po-auth-wrapper.woodmart-compatible .wd-login-divider span {
    background: #fff;
    padding: 0 10px;
    color: #aaa;
    font-size: 12px;
    position: relative;
    z-index: 1;
}

.po-auth-wrapper.woodmart-compatible .wd-login-divider::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #eee;
}

.po-auth-wrapper.woodmart-compatible .wd-social-login {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.po-auth-wrapper.woodmart-compatible .wd-social-login .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 15px;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: opacity 0.2s;
    width: 100%;
}

.po-auth-wrapper.woodmart-compatible .wd-social-login .btn:hover {
    opacity: 0.85;
    color: #fff;
}

.po-auth-wrapper.woodmart-compatible .login-fb-link { background: #1877f2; }
.po-auth-wrapper.woodmart-compatible .login-goo-link { background: #ea4335; }

/* Верификация клиентов (6 цифр) */
.po-auth-wrapper.woodmart-compatible .po-verify-title {
    font-size: 13px;
    margin-bottom: 12px;
    text-align: center;
    font-weight: 600;
}

.po-auth-wrapper.woodmart-compatible .code-inputs-wrapper {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 16px 0;
}

.po-auth-wrapper.woodmart-compatible .code-input {
    width: 34px !important;
    height: 40px !important;
    padding: 0 !important;
    text-align: center !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    transition: border-color 0.2s !important;
    background: #fff !important;
}

.po-auth-wrapper.woodmart-compatible .code-input:focus {
    border-color: #0b76ef !important;
    outline: none !important;
}

.po-auth-wrapper.woodmart-compatible .po-resend-wrapper {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
}

.po-auth-wrapper.woodmart-compatible .po-resend-wrapper a {
    color: #0b76ef;
    text-decoration: none;
}

.po-auth-wrapper.woodmart-compatible .po-resend-wrapper a:hover {
    text-decoration: underline;
}

/* Блок и стили 2FA кнопок для администраторов */
.po-auth-wrapper.woodmart-compatible .po-2fa-method-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.po-auth-wrapper.woodmart-compatible .po-2fa-method-buttons .button-secondary {
    flex: 1;
    min-height: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 !important; /* ЖЁСТКО ОБНУЛЯЕМ 15px ПАДДИНГ ВЫШЕ */
    border: none !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease !important;
    overflow: hidden;
	gap: 0 !important;
}

/* Цвет кнопки Email (Gmail Red) */
.po-auth-wrapper.woodmart-compatible .po-2fa-method-buttons .button-secondary[data-method="email"] {
    background-color: #ea4335 !important;
}
.po-auth-wrapper.woodmart-compatible .po-2fa-method-buttons .button-secondary[data-method="email"]:hover:not(:disabled) {
    background-color: #d63325 !important;
}

/* Цвет кнопки Telegram (Telegram Blue) */
.po-auth-wrapper.woodmart-compatible .po-2fa-method-buttons .button-secondary[data-method="telegram"] {
    background-color: #0088cc !important;
}
.po-auth-wrapper.woodmart-compatible .po-2fa-method-buttons .button-secondary[data-method="telegram"]:hover:not(:disabled) {
    background-color: #0077b5 !important;
}

/* ЗОНА 1: Квадратная иконка 30x30 с чертой */
.po-auth-wrapper.woodmart-compatible .po-2fa-method-buttons .po-btn-icon {
    position: static !important;
    width: 30px !important;
    height: 30px !important;
    padding: 6px !important;
    box-sizing: border-box !important;
    fill: none !important;
    stroke: #ffffff !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    border-right: 1px solid rgba(255, 255, 255, 0.3) !important;
    flex-shrink: 0 !important;
    display: block !important;
}

/* ЗОНА 2: Текст строго по центру справа от черты */
.po-auth-wrapper.woodmart-compatible .po-2fa-method-buttons .js-btn-text {
    flex: 1 !important;
    text-align: center !important;
    text-transform: capitalize !important;
    color: #ffffff !important;
    padding: 0 4px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

/* Состояние активной/нажатой кнопки */
.po-auth-wrapper.woodmart-compatible .po-2fa-method-buttons .button-secondary.active {
    box-shadow: inset 0 0 0 2px #ffffff, 0 3px 6px rgba(0, 0, 0, 0.2) !important;
}

/* Состояние заблокированной кнопки (при таймауте) */
.po-auth-wrapper.woodmart-compatible .po-2fa-method-buttons .button-secondary:disabled,
.po-auth-wrapper.woodmart-compatible .po-2fa-method-buttons .button-secondary.po-disabled {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    filter: grayscale(20%);
    box-shadow: none !important;
}

.code-inputs-wrapper.po-admin-code-inputs {
    justify-content: center;
    gap: 10px;
}

.code-inputs-wrapper.po-admin-code-inputs .po-admin-2fa-input {
    width: 100% !important;
    height: 48px !important;
    font-size: 22px !important;
    max-width: 72px;
}

/* Уведомления и ошибки */
.po-auth-wrapper.woodmart-compatible .good-verified {
    padding: 10px 12px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
    text-align: center;
}

.po-auth-wrapper.woodmart-compatible .custom-error {
    padding: 10px 12px;
    background: #fee;
    color: #c00;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
    text-align: center;
}

/* Попап */
#login-popup-module {
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#login-popup-module.is-visible {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.login-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
}

#login-popup-module .login-popup-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    width: 90%;
    max-width: 380px;
    max-height: 90vh;
    overflow-y: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 100000;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    opacity: 0;
}

#login-popup-module.is-visible .login-popup-container {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

#login-popup-module .login-popup__close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 4px;
    transition: color 0.2s;
}

#login-popup-module .login-popup__close-btn:hover {
    color: #111;
}

.po-myaccount-container {
    max-width: 380px;
    margin: 30px auto;
    padding: 24px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.wd-event-hover.po-keep-open .wd-dropdown,
.wd-header-my-account.po-keep-open .wd-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    display: block !important;
    transform: none !important;
}

.wd-event-hover.po-keep-open,
.wd-event-hover.po-keep-open .wd-dropdown {
    transition: none !important;
}

.wd-event-hover.po-just-closed .wd-dropdown,
.wd-header-my-account.po-just-closed .wd-dropdown {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}

.wd-close-side.po-overlay-locked {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 1;
}

.po-auth-wrapper .woocommerce-privacy-policy-text {
    display: none !important;
}

.po-auth-wrapper.woodmart-compatible .required {
    color: #e53935;
    font-weight: 600;
    margin-left: 2px;
}

.js-resend.po-disabled,
.js-resend[disabled] {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none;
    text-decoration: none;
}

.po-resend-status-notice {
    font-size: 12px;
    line-height: 1.3;
    margin-top: 6px;
    display: block;
    text-align: center;
}

.po-resend-status-notice.po-status-success {
    color: #4caf50;
}

.po-resend-status-notice.po-status-error {
    color: #e53935;
}