/* ========================================
   POPUP CONTENT STYLES
   Централизованные стили для контента popup
   ======================================== */

/* === CSS VARIABLES === */
:root {
    --popup-font: 'Manrope', sans-serif;
    --popup-text: rgba(255, 255, 255, 0.78);
    --popup-text-white: white;
    --popup-text-muted: #A8B2BD;
    --popup-text-hint: #B7B7BB;
    --popup-link: #296087;
    --popup-danger: #F44747;
    --popup-field-bg: #1A232B;
    --popup-field-border: #2B2F3B;
    --popup-glass-bg: rgba(90, 90, 103, 0.2);
    --popup-glass-hover: rgba(90, 90, 103, 0.35);
    --popup-border-top: rgba(255, 255, 255, 0.1);
    --popup-border-bottom: rgba(255, 255, 255, 0.05);
}

/* === TYPOGRAPHY MIXINS (via classes) === */

/* Title: 32/40 bold */
.popup-title,
.popup-content-wrapper h2 {
    font-family: var(--popup-font);
    font-weight: 700;
    font-size: 32px;
    line-height: 40px;
    color: var(--popup-text-white);
    margin: 0;
    padding-right: 50px;
}

/* Section title: 24/32 bold */
.popup-section-title {
    font-family: var(--popup-font);
    font-weight: 700;
    font-size: 24px;
    line-height: 32px;
    color: var(--popup-text-white);
    margin: 0;
}

/* Body text: 16/24 regular */
.popup-description,
.info-value,
.tfa-setup-hint,
.field-value-only {
    font-family: var(--popup-font);
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: var(--popup-text);
    margin: 0;
}

/* Label text: 12/16 regular muted */
.popup-field label,
.info-label,
.field-label {
    font-family: var(--popup-font);
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: var(--popup-text-muted);
}

/* === BASE LAYOUT === */

.popup-content-wrapper,
.verify-popup-content,
.confirm-details-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.verify-popup-content,
.confirm-details-content {
    gap: 24px;
}

/* === LINKS === */

.popup-link,
.chk a {
    color: var(--popup-link);
    text-decoration: none;
}

.popup-link:hover,
.chk a:hover {
    text-decoration: underline;
}

/* === ACTIONS === */

.popup-actions-right {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.popup-actions-between {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.popup-actions-center {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.popup-header-with-btn {
    display: flex;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.popup-header-with-btn .popup-title {
    padding-right: 0;
}

/* === FORM ELEMENTS === */

.popup-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.popup-field {
    position: relative;
    border-radius: 20px;
    background: var(--popup-field-bg);
    border: 1px solid var(--popup-field-border);
}

.popup-field label {
    position: absolute;
    left: 20px;
    top: 10px;
}

.popup-field input {
    width: 100%;
    height: 54px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--popup-text-white);
    padding: 22px 18px 6px;
    font-family: var(--popup-font);
    font-size: 16px;
    font-weight: 400;
    box-sizing: border-box;
}

.popup-field input::placeholder {
    color: #5A5A67;
}

/* === INFO GRID === */

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-value {
    color: var(--popup-text-white);
}

/* === BUTTONS === */

/* Glass button base */
.btn-glass {
    background: var(--popup-glass-bg);
    color: var(--popup-text-white);
    border-top: solid 1px var(--popup-border-top);
    border-bottom: solid 1px var(--popup-border-bottom);
    backdrop-filter: blur(6px);
}

.btn-glass:hover {
    background: var(--popup-glass-hover);
    border-top-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Danger button (logout) */
.btn-logout-confirm {
    background: rgba(244, 71, 71, 0.2);
    color: var(--popup-danger);
    border-top: solid 1px var(--popup-border-top);
    border-bottom: solid 1px var(--popup-border-bottom);
    backdrop-filter: blur(6px);
    min-width: 120px;
}

.btn-logout-confirm:hover {
    background: rgba(244, 71, 71, 0.35);
    border-top-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Disabled state (universal for all popup buttons) */
.modal button:disabled,
.modal .btn:disabled,
.popup-form button:disabled,
.js-do-auth button:disabled,
.auth-form button:disabled {
    background: rgba(90, 90, 103, 0.1) !important;
    color: rgba(255, 255, 255, 0.3) !important;
    cursor: not-allowed !important;
    border-radius: 100px;
    border: none !important;
    border-top: solid 1px rgba(255, 255, 255, 0.1) !important;
    border-bottom: solid 1px rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
}

.modal button:disabled:hover,
.modal .btn:disabled:hover,
.popup-form button:disabled:hover,
.js-do-auth button:disabled:hover,
.auth-form button:disabled:hover {
    transform: none !important;
    background: rgba(90, 90, 103, 0.1) !important;
}

/* === CHECKBOX === */

.chk {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-family: var(--popup-font);
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: var(--popup-text);
    cursor: pointer;
}

.chk input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 19px;
    height: 19px;
    margin-top: 2px;
    flex-shrink: 0;
    border: 1.5px solid #FFFFFF;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.chk input[type="checkbox"]:checked {
    background: var(--popup-link);
    border-color: var(--popup-link);
}

.chk input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* === 2FA SPECIFIC === */

.tfa-setup-qr img {
    width: 302px;
    height: 302px;
    border-radius: 20px;
    display: block;
    padding: 16px;
    background-color: white;
    box-sizing: content-box;
}

.tfa-setup-secret {
    font-family: var(--popup-font);
    font-weight: 500;
    font-size: 18px;
    line-height: 24px;
    color: var(--popup-text-white);
    letter-spacing: 2px;
}

.tfa-setup-hint {
    color: var(--popup-text-hint);
}

/* 2FA code input */
.tfa-setup-form .popup-field input {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 8px;
}

/* === EXCHANGE SPECIFIC === */

.exchange-wallet-display {
    margin-bottom: 8px;
}

.exchange-wallet-display .field-label {
    margin-bottom: 6px;
}

.exchange-wallet-display .field-value-only {
    border-radius: 20px;
    background: var(--popup-field-bg);
    border: 1px solid var(--popup-field-border);
    padding: 15px 20px;
    color: var(--popup-text-white);
    word-break: break-all;
}

.currency-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.currency-icon-small {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

/* === RESPONSIVE === */

@media (max-width: 520px) {
    .popup-title,
    .popup-content-wrapper h2 {
        font-size: 24px;
        line-height: 32px;
    }
    
    .popup-description {
        font-size: 14px;
        line-height: 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .tfa-setup-qr img {
        width: 100%;
        max-width: 280px;
        height: auto;
    }
    
    .tfa-setup-secret {
        font-size: 14px;
        letter-spacing: 1px;
        word-break: break-all;
    }
    
    .popup-header-with-btn:not(.exchange-header-row) {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}
