/**
 * KeyAuth Register Page Styles
 * CSS riêng cho trang đăng ký
 * @author KeyAuth Team
 * @version 1.0.0
 */

/* ============================================
   1. Social Button Styles
   ============================================ */
.social-button {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    font-size: 24px;
}

.social-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Grid Layout */
.grid {
    display: grid;
    gap: 10px;
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   2. Form Input Styles
   ============================================ */
.register-form .form-input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem;
    background: transparent;
    border: 1px solid rgb(var(--color-custom));
    border-radius: 0.5rem;
    color: white;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.register-form .form-input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.register-form .form-label {
    position: absolute;
    left: 0.25rem;
    padding: 0 0.5rem;
    background-color: rgb(var(--color-custom-back));
    color: #6b7280;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* ============================================
   3. Password Strength Bar
   ============================================ */
.password-strength-bar {
    width: 100%;
    height: 6px;
    background-color: rgb(31, 41, 55);
    border-radius: 9999px;
    overflow: hidden;
}

.password-strength-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

/* Password strength colors */
.strength-none { background-color: #4b5563; }
.strength-weak { background-color: #ef4444; }
.strength-medium { background-color: #f59e0b; }
.strength-strong { background-color: #22c55e; }

/* ============================================
   4. Password Requirements List
   ============================================ */
.password-requirements {
    background-color: rgba(17, 24, 39, 0.3);
    border: 1px solid rgba(31, 41, 55, 0.5);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
}

.password-requirements ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem 0.75rem;
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    transition: color 0.2s ease;
}

.password-requirements .req-met {
    color: #4ade80;
}

.password-requirements .req-not-met {
    color: #6b7280;
}

/* ============================================
   5. Register Button
   ============================================ */
.btn-register {
    width: 100%;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    color: white;
    font-weight: 500;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-register:hover {
    background: linear-gradient(to right, #1d4ed8, #1e40af);
    transform: scale(1.02);
}

.btn-register:active {
    transform: scale(0.98);
}

/* ============================================
   6. Telegram Popup
   ============================================ */
#telegram-popup {
    background-color: rgba(0, 0, 0, 0.5);
}

#telegram-popup.hidden {
    display: none;
}

/* ============================================
   7. Social Login Buttons
   ============================================ */
.social-login-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: rgb(var(--color-custom-back-1));
    padding: 1rem;
    border-radius: 0.75rem;
    width: 80px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.social-login-btn:hover {
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

/* ============================================
   8. Divider
   ============================================ */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.divider hr {
    flex: 1;
    border-color: rgb(55, 65, 81);
}

.divider span {
    margin: 0 1rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* ============================================
   9. Error/Success Messages
   ============================================ */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

/* ============================================
   10. Floating Label Animation
   ============================================ */
.floating-label {
    position: relative;
}

.floating-label .form-input {
    padding-top: 1.25rem;
    padding-bottom: 0.625rem;
}

.floating-label .form-input:focus + .form-label,
.floating-label .form-input:not(:placeholder-shown) + .form-label {
    top: 0;
    transform: translateY(-50%) scale(0.75);
    color: #2563eb;
}

.floating-label .form-label {
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
}
