/* Auth Forms - Styling for Authentication Forms using BEM naming */

/* Form Container */
.asc-auth-form {
    color: white;
    width: 100%;
}

.asc-auth-form-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: white;
    font-weight: 600;
}

.asc-auth-form-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Form Controls */
.asc-form-group {
    margin-bottom: 1.25rem;
}

.asc-form-label {
    display: block;
    margin-bottom: 0.375rem;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

.asc-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.2s ease;
}

    .asc-form-control:focus {
        outline: none;
        border-color: var(--game-primary);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    }

    .asc-form-control::placeholder {
        color: rgba(255, 255, 255, 0.4);
    }

/* ONLY add MudBlazor text color overrides for WHITE text */
.asc-auth-form .mud-input,
.asc-auth-form .mud-input-slot {
    color: white !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

    .asc-auth-form .mud-input::placeholder {
        color: rgba(255, 255, 255, 0.4) !important;
    }

/* Handle inputs with start adornments (icons) */
.asc-auth-form .mud-input-adornment-start + .mud-input,
.asc-auth-form .mud-input-adornment-start + .mud-input-slot {
    padding-left: 8px !important;
}

.asc-form-error {
    color: var(--game-danger);
    font-size: 0.85rem;
    margin-top: 0.375rem;
    animation: errorShake 0.3s ease;
}

/* Form Actions */
.asc-form-actions {
    margin-top: 1.5rem;
}

.asc-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

    .asc-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: 0.5s;
    }

    .asc-button:hover::before {
        left: 100%;
    }

    .asc-button:active {
        transform: translateY(2px);
    }

.asc-button-primary {
    background: linear-gradient(to bottom, var(--game-primary), #2563eb);
    color: white;
    box-shadow: 0 4px 0 #1d4ed8, 0 5px 5px rgba(0, 0, 0, 0.3);
}

    .asc-button-primary:active {
        box-shadow: 0 2px 0 #1d4ed8, 0 3px 3px rgba(0, 0, 0, 0.3);
    }

.asc-button-secondary {
    background: linear-gradient(to bottom, #4b5563, #374151);
    color: white;
    box-shadow: 0 4px 0 #1f2937, 0 5px 5px rgba(0, 0, 0, 0.3);
}

    .asc-button-secondary:active {
        box-shadow: 0 2px 0 #1f2937, 0 3px 3px rgba(0, 0, 0, 0.3);
    }

.asc-button-fullwidth {
    width: 100%;
}

/* Separator */
.asc-form-separator {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.asc-separator-line {
    flex: 1;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
}

.asc-separator-text {
    padding: 0 15px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* OAuth Buttons */
.asc-oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
}

.asc-oauth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

    .asc-oauth-button:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

.asc-oauth-icon {
    font-size: 1.25rem;
}

.asc-oauth-text {
    font-weight: 500;
}

/* Footer */
.asc-form-footer {
    margin-top: 1.25rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.asc-link {
    color: var(--game-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

    .asc-link:hover {
        text-decoration: underline;
        color: #60a5fa;
    }

/* Role Selection */
.asc-role-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* Make sure cards fit in smaller container */
@media (max-width: 768px) {
    .asc-role-selection {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* Responsive */
@media (max-width: 576px) {
    .asc-auth-form-title {
        font-size: 1.3rem;
    }

    .asc-button {
        padding: 0.625rem 1.25rem;
    }
}

/* Animations */
@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }

    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }

    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}
