/* Login page styles */
body {
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}

input, button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.tap-target {
    position: relative;
    min-height: 48px;
}

/* Style cho form đăng nhập */
.login-form {
    max-width: 400px;
    margin: 0 auto;
}

.login-form .form-control {
    max-width: 100%;
    font-size: var(--font-size-base, 16px);
    padding: var(--input-padding, 12px 16px);
    border: var(--border-width, 2px) solid var(--border-color, #e1e5e9);
}

/* Style cho nút gửi mã */
.btn-send-code {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border: none;
    color: white;
    padding: var(--button-padding, 12px 24px);
    border-radius: var(--border-radius, 8px);
    font-weight: 500;
    transition: var(--transition, all 0.3s ease);
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
}

.btn-send-code:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-send-code:active {
    transform: translateY(0);
}

/* Style cho loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .login-form {
        padding: 1rem;
        margin: 0 1rem;
    }
    
    .login-form .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Radio button styling */
.login-type-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.login-type-option {
    flex: 1;
    position: relative;
}

.login-type-option input[type="radio"] {
    display: none;
}

.login-type-option .login-type-option label {
    display: block;
    padding: var(--input-padding, 12px 16px);
    border: var(--border-width, 2px) solid var(--border-color, #e1e5e9);
    border-radius: var(--border-radius, 8px);
    cursor: pointer;
    text-align: center;
    transition: var(--transition, all 0.3s ease);
    font-weight: 500;
}

.login-type-option input[type="radio"]:checked + label {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
}

.login-type-option label:hover {
    border-color: var(--primary-hover);
}

/* Alert styles */
.alert {
    padding: 12px 16px;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
}

.alert-info {
    background-color: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.alert-error {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #dc2626;
}

.alert-success {
    background-color: #dcfce7;
    border-color: #22c55e;
    color: #16a34a;
}

/* Form fields */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: var(--input-padding, 12px 16px);
    border: var(--border-width, 2px) solid var(--border-color, #e1e5e9);
    border-radius: var(--border-radius, 8px);
    font-size: var(--font-size-base, 16px);
    transition: var(--transition, all 0.3s ease);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Hidden by default */
.password-field {
    display: none;
}

/* Show when password login is selected */
.password-field.show {
    display: block;
}
