/**
 * Custom Login Page Styles - Updated with Yellow/Black Branding
 *
 * Branded login styling for TeamBuilder Managers
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Wrapper */
.tbp-login-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f7e016 0%, #000000 100%);
    padding: 20px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Container */
.tbp-login-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.tbp-login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.tbp-login-logo img {
    max-width: 180px;
    max-height: 80px;
    object-fit: contain;
}

.tbp-login-logo-text {
    font-size: 32px;
    font-weight: 700;
    color: #f7e016;
    letter-spacing: -0.5px;
    font-family: 'Poppins', sans-serif;
}

/* Title */
.tbp-login-title {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    color: #000000;
    margin: 0 0 24px 0;
    font-family: 'Poppins', sans-serif;
}

/* Messages */
.tbp-login-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
}

.tbp-login-message.tbp-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.tbp-login-message.tbp-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Form */
.tbp-login-form {
    width: 100%;
}

.tbp-form-description {
    color: #4a5568;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: center;
}

.tbp-form-group {
    margin-bottom: 20px;
}

.tbp-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.tbp-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #2d3748;
    background-color: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.tbp-input:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #f7e016;
    box-shadow: 0 0 0 3px rgba(247, 224, 22, 0.2);
}

.tbp-input.error {
    border-color: #fc8181;
    background-color: #fff5f5;
}

.tbp-error-message {
    display: block;
    color: #e53e3e;
    font-size: 13px;
    margin-top: 6px;
    min-height: 18px;
}

/* Checkbox */
.tbp-checkbox-group {
    margin-bottom: 24px;
}

.tbp-checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
}

.tbp-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #f7e016;
}

/* Button */
.tbp-button {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.tbp-button-primary {
    background: #f7e016;
    color: #000000;
    box-shadow: 0 4px 14px rgba(247, 224, 22, 0.4);
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.tbp-button-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 224, 22, 0.5);
    background: #e6d014;
}

.tbp-button-primary:active:not(:disabled) {
    transform: translateY(0);
}

.tbp-button-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tbp-button-secondary {
    background-color: #cbd5e0;
    color: #2d3748;
}

.tbp-button-secondary:hover:not(:disabled) {
    background-color: #a0aec0;
}

/* Button Loader */
.button-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.button-loader .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Links */
.tbp-login-links {
    text-align: center;
    margin-top: 24px;
}

.tbp-link {
    color: #f7e016;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.tbp-link:hover {
    color: #e6d014;
    text-decoration: underline;
}

/* Footer */
.tbp-login-footer {
    margin-top: 32px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.tbp-login-footer p {
    margin: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .tbp-login-container {
        padding: 32px 24px;
    }

    .tbp-login-title {
        font-size: 24px;
    }

    .tbp-login-logo-text {
        font-size: 28px;
    }

    .tbp-already-logged-in h2 {
        font-size: 24px;
    }

    .tbp-success-icon-large {
        width: 64px;
        height: 64px;
        font-size: 36px;
    }
}

@media (min-width: 480px) {
    .tbp-logged-in-actions {
        flex-direction: row;
        justify-content: center;
    }

    .tbp-logged-in-actions .tbp-button {
        width: auto;
        min-width: 180px;
    }
}

/* Already Logged In Section */
.tbp-already-logged-in {
    text-align: center;
    padding: 20px 0;
}

.tbp-success-icon-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f7e016 0%, #e6d014 100%);
    color: #000000;
    border-radius: 50%;
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(247, 224, 22, 0.3);
}

.tbp-already-logged-in h2 {
    margin: 0 0 16px 0;
    font-size: 28px;
    font-weight: 600;
    color: #000000;
    font-family: 'Poppins', sans-serif;
}

.tbp-logged-in-text {
    margin: 0 0 24px 0;
    font-size: 16px;
    color: #4a5568;
    line-height: 1.6;
}

.tbp-info-box-login {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border-radius: 8px;
    margin: 24px 0;
    background-color: #fffae6;
    border-left: 4px solid #f7e016;
    text-align: left;
}

.tbp-info-box-login .tbp-info-icon {
    font-size: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.tbp-info-box-login .tbp-info-content {
    flex: 1;
}

.tbp-info-box-login .tbp-info-content p {
    margin: 0;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.tbp-logged-in-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.tbp-button-secondary {
    background: #6c757d;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.tbp-button-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.tbp-button-secondary:active:not(:disabled) {
    transform: translateY(0);
}

/* Accessibility */
.tbp-input:focus-visible,
.tbp-button:focus-visible,
.tbp-link:focus-visible {
    outline: 3px solid #f7e016;
    outline-offset: 2px;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .tbp-login-container {
        background: #1a202c;
    }

    .tbp-login-title {
        color: #f7fafc;
    }

    .tbp-form-group label {
        color: #e2e8f0;
    }

    .tbp-input {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #f7fafc;
    }

    .tbp-input:focus {
        background-color: #2d3748;
    }

    .tbp-form-description {
        color: #cbd5e0;
    }

    .tbp-checkbox-group label {
        color: #cbd5e0;
    }
}
