/* ========================================
   TWO-FACTOR AUTHENTICATION STYLES
   Стили карточки 2FA в профиле
   ======================================== */

/* === CARD === */

.tfa-card {
    padding: 32px;
    gap: 16px;
}

.tfa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.tfa-header h3 {
    margin: 0;
    font-weight: 700;
    font-size: 24px;
    line-height: 32px;
    color: white;
}

.tfa-description {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: var(--grey-text);
    margin: 0;
}

/* === TOGGLE SWITCH === */

.tfa-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    cursor: pointer;
}

.tfa-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.tfa-toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(90, 90, 103, 0.2);
    border-radius: 32px;
    transition: all 0.3s ease;
    border-top: solid 1px rgba(255, 255, 255, 0.1);
    border-bottom: solid 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
}

.tfa-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Checked state */
.tfa-toggle-input:checked + .tfa-toggle-slider {
    background: rgba(37, 230, 108, 0.2);
}

.tfa-toggle-input:checked + .tfa-toggle-slider:before {
    transform: translateX(24px);
    background-color: #25E66C;
    box-shadow: 0 0 8px rgba(37, 230, 108, 0.5);
}

/* Hover state */
.tfa-toggle:hover .tfa-toggle-slider {
    border-top-color: rgba(255, 255, 255, 0.2);
}


/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
    .tfa-card {
        padding: 28px 24px;
        gap: 14px;
    }
    
    .tfa-header h3 {
        font-size: 22px;
        line-height: 30px;
    }
    
    .tfa-description {
        font-size: 15px;
        line-height: 22px;
    }
    
    .tfa-toggle {
        width: 44px;
        height: 22px;
    }
    
    .tfa-toggle-slider:before {
        height: 16px;
        width: 16px;
    }
    
    .tfa-toggle-input:checked + .tfa-toggle-slider:before {
        transform: translateX(22px);
    }
}

@media (max-width: 520px) {
    .tfa-card {
        padding: 24px 20px;
        gap: 12px;
    }
    
    .tfa-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .tfa-header h3 {
        font-size: 20px;
        line-height: 28px;
    }
    
    .tfa-description {
        font-size: 14px;
        line-height: 20px;
    }
    
    .tfa-toggle {
        width: 42px;
        height: 20px;
    }
    
    .tfa-toggle-slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
    }
    
    .tfa-toggle-input:checked + .tfa-toggle-slider:before {
        transform: translateX(22px);
    }
}
