/*
 * login.css
 *
 * Styles for login panel and authentication UI
 */

.login-panel {
    max-width: 400px;
    margin: 0 auto;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 0.95rem;
    color: #666;
    text-align: center;
    margin-bottom: 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: border-color 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
}

.form-input::placeholder {
    color: #aaa;
}

/* Password input container with toggle button */
.password-input-container {
    position: relative;
    width: 100%;
}

.password-input-container .form-input {
    padding-right: 45px; /* Make room for toggle button */
}

.password-toggle-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s ease, transform 0.2s ease;
}

.password-toggle-button:hover {
    color: #333;
    transform: translateY(-50%) scale(1.1);
}

.password-toggle-button:active {
    transform: translateY(-50%) scale(0.95);
}

.password-toggle-icon {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.login-message {
    min-height: 20px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-message.error {
    background: #ffe6e6;
    color: #d32f2f;
    border: 1px solid #ffcccc;
    opacity: 1;
}

.login-message.success {
    background: #e6f7e6;
    color: #2e7d32;
    border: 1px solid #b3e6b3;
    opacity: 1;
}

.login-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.login-button {
    padding: 12px 20px;
    border-radius: 6px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.login-button-primary {
    background: #667eea;
    color: white;
}

.login-button-primary:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.login-button-primary:active {
    transform: translateY(0);
}

.login-button-primary.ghosted {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.login-button-secondary {
    background: #e0e0e0;
    color: #555;
    position: relative;
}

.login-button-secondary:hover {
    background: #d0d0d0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.login-button-secondary:active {
    transform: translateY(0);
}

/* Tooltip for skip button */
.login-button-secondary[data-tooltip] {
    position: relative;
}

.login-button-secondary[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(51, 51, 51, 0.95);
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    width: 280px;
    max-width: 280px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.login-button-secondary[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(2px);
    border: 6px solid transparent;
    border-top-color: rgba(51, 51, 51, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.login-button-secondary[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

.login-button-secondary[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.login-divider {
    text-align: center;
    position: relative;
    margin: 10px 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: #e0e0e0;
}

.login-divider::before {
    left: 0;
}

.login-divider::after {
    right: 0;
}

.login-divider span {
    font-size: 0.85rem;
    color: #888;
    background: white;
    padding: 0 15px;
    position: relative;
}

.login-button-create {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.login-button-create:hover {
    background: #f5f7ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.login-button-create:active {
    transform: translateY(0);
}

/* Responsive styles for login panel */
@media (max-width: 768px) {
    .login-panel {
        padding: 20px;
    }

    .login-title {
        font-size: 1.3rem;
    }

    .login-subtitle {
        font-size: 0.9rem;
    }

    .login-form {
        gap: 15px;
    }

    .login-button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .login-buttons {
        flex-direction: column;
    }

    .login-divider {
        margin: 15px 0;
    }

    /* Adjust tooltip for mobile */
    .login-button-secondary[data-tooltip]::before {
        width: 260px;
        max-width: 90vw;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}
