﻿/* Shared authentication page styles */

/* ─────────────────────────────────────────────────────────────────
   Logo
   ───────────────────────────────────────────────────────────────── */
.company-logo {
    background-image: url('../images/brytviewlogo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 150px;
    height: auto;
    display: inline-block;
    margin-bottom: 20px;
    border-radius: 8px;
}

/* ─────────────────────────────────────────────────────────────────
   Auth Container & Background
   ───────────────────────────────────────────────────────────────── */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px;
    position: relative;
    overflow: hidden;
}

.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

/* ─────────────────────────────────────────────────────────────────
   Floating Elements Animation
   ───────────────────────────────────────────────────────────────── */
.floating-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.element-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.element-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.element-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* ─────────────────────────────────────────────────────────────────
   Auth Card
   ───────────────────────────────────────────────────────────────── */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ─────────────────────────────────────────────────────────────────
   Auth Header
   ───────────────────────────────────────────────────────────────── */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

    .auth-header h2 {
        font-size: 24px;
        margin-bottom: 16px;
        color: #2d3748;
    }

    .auth-header p {
        margin-bottom: 24px;
        color: #4a5568;
    }

.login-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
}

/* ─────────────────────────────────────────────────────────────────
   Auth Buttons
   ───────────────────────────────────────────────────────────────── */
.auth-button {
    width: 100%;
    padding: 16px;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.primary-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

    .primary-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    }

.auth-button:disabled,
.auth-button[disabled] {
    background: #a0aec0 !important;
    color: #cbd5e0 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 0.65;
}

    .auth-button:disabled:hover,
    .auth-button[disabled]:hover {
        background: #a0aec0 !important;
        transform: none !important;
        box-shadow: none !important;
    }

.button-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ─────────────────────────────────────────────────────────────────
   Form Elements
   ───────────────────────────────────────────────────────────────── */
.form-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 500px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    align-items: flex-start;
    text-align: left;
}

.form-label {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

    .form-input:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    .form-input:disabled,
    .form-input[disabled] {
        background-color: #f7fafc;
        opacity: 0.6;
        cursor: not-allowed;
    }

.form-input-invalid {
    border-color: #fecaca;
}

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

/* ─────────────────────────────────────────────────────────────────
   Messages (Error & Success)
   ───────────────────────────────────────────────────────────────── */
.auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    margin: 20px auto;
    width: 100%;
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
    animation: slideDown 0.3s ease-out;
}

    .auth-error svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    .auth-error strong {
        font-weight: 600;
    }
.auth-success-message {
    width: 100%;
    max-width: 400px;
    font-weight: 600;
    background-color: #d4edda; /* light green */
    color: #155724; /* dark green text */
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}


    .auth-success-message::before {
        content: "✔"; /* Unicode check mark */
        font-size: 18px;
    }


.form-error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 4px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─────────────────────────────────────────────────────────────────
   Success State
   ───────────────────────────────────────────────────────────────── */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    font-size: 48px;
    line-height: 64px;
    color: #059669;
}

.success-title {
    font-size: 24px;
    margin-bottom: 16px;
    color: #2d3748;
}

.success-text {
    color: #4a5568;
    margin-bottom: 12px;
}

.success-hint {
    color: #718096;
    font-size: 0.9rem;
}

/* ─────────────────────────────────────────────────────────────────
   Footer & Misc
   ───────────────────────────────────────────────────────────────── */
.login-footer {
    width: 100%;
    text-align: center;
    margin-top: 24px;
}

.verification-info {
    margin: 20px 0;
}

.password-wrapper {
    position: relative;
    display: block;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    z-index: 10;
}

    .password-toggle-btn:hover {
        color: #333;
    }

    .password-toggle-btn i {
        pointer-events: none;
    }

/* Hide Edge's native reveal and clear buttons */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none !important;
}

/* Optional: Hide Safari's credentials "key" icon (rarely needed) */
input::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    pointer-events: none;
}

.verification-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.method-card {
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

    .method-card:hover {
        border-color: #667eea;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    }

    .method-card.selected {
        border-color: #667eea;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

        .method-card.selected p,
        .method-card.selected .method-detail {
            color: rgba(255, 255, 255, 0.9);
        }

.method-icon {
    margin-bottom: 0.75rem;
    color: #667eea;
}

.method-card.selected .method-icon {
    color: white;
}

.method-detail {
    font-weight: 600;
    margin-top: 0.5rem;
    color: #2d3748;
}

.yahoo-2fa-methods {
    margin-top: 2rem;
}

.yahoo-method {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: border-color 0.2s;
    background: white;
}

    .yahoo-method:hover {
        border-color: #a178ff;
    }

.yahoo-method-primary {
    border: 2px solid #a178ff;
    background: #f8f5ff;
}

.yahoo-method-icon-large {
    font-size: 2.5rem;
    color: #6c43e0;
    margin-right: 1.5rem;
}

.yahoo-method-icon {
    font-size: 2rem;
    color: #6c43e0;
    margin-right: 1.5rem;
    width: 50px;
    text-align: center;
}

.yahoo-method-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: #333;
}

.yahoo-method-content p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.yahoo-method-detail {
    font-weight: 600;
    color: #333;
    margin-top: 0.5rem;
}

.yahoo-method-arrow {
    margin-left: auto;
    color: #999;
    font-size: 1.2rem;
}