/* Authentication Pages Styling */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem;
}

.auth-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    width: 100%;
    max-width: 500px;
}

.auth-card h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.auth-card h2 {
    text-align: center;
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.step-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.form-check-input {
    margin-right: 0.5rem;
    cursor: pointer;
    width: 1rem;
    height: 1rem;
}

.form-check-label {
    cursor: pointer;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.form-check-label a {
    color: #667eea;
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #5568d3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
}

.btn-outline-primary {
    background-color: transparent;
    color: #667eea;
    border: 1px solid #667eea;
}

.btn-outline-primary:hover:not(:disabled) {
    background-color: #667eea;
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    color: #999;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background-color: #ddd;
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.auth-links {
    text-align: center;
    font-size: 0.95rem;
    margin-top: 1.5rem;
}

/* ---- Social / Federated Login Buttons ---- */
.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    transition: background 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

.btn-social:hover {
    background: #f5f5f5;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    text-decoration: none;
    color: #333;
}

.social-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-apple {
    background: #000;
    color: #fff;
    border-color: #000;
}

.btn-apple:hover {
    background: #222;
    color: #fff;
}
/* ---- end Social Login ---- */


.auth-links p {
    margin: 0.5rem 0;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.alert {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert h4 {
    margin-top: 0;
}

.alert p {
    margin-bottom: 0.5rem;
}

.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.text-center {
    text-align: center;
}

.me-2 {
    margin-right: 0.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

/* MFA Specific Styles */

.security-benefits {
    background-color: #f0f4ff;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.security-benefits h4 {
    margin-top: 0;
    color: #667eea;
}

.security-benefits ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.security-benefits li {
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.95rem;
}

.qr-code-container {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.qr-code {
    max-width: 200px;
    height: auto;
    border: 2px solid #ddd;
    padding: 0.5rem;
}

.secret-key-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.secret-key {
    flex: 1;
    padding: 0.5rem;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

.totp-input {
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    text-align: center;
    font-weight: bold;
}

.code-input {
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    text-align: center;
    font-weight: bold;
}

.backup-codes-container {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    columns: 2;
    column-gap: 1rem;
}

.backup-code {
    background-color: white;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

.toggle-text {
    text-align: center;
    font-size: 0.95rem;
    margin: 1rem 0;
}

.toggle-text a {
    color: #667eea;
    text-decoration: none;
    cursor: pointer;
}

.toggle-text a:hover {
    text-decoration: underline;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6c757d;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
        max-width: 100%;
    }

    .auth-card h1 {
        font-size: 1.5rem;
    }

    .auth-card h2 {
        font-size: 1.1rem;
    }

    .backup-codes-container {
        columns: 1;
    }
}
