﻿/* Main container styling */
.ML-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin-top: 2rem;
    min-height: 80vh;
}

/* Card styling */
.ML-card {
    background-color: #ffffff;
    border-radius: 1.5rem;
    width: 100%;
    max-width: 28rem;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Header styling */
.ML-header {
    margin-bottom: 2.5rem;
}

.ML-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #333;
    margin: 0;
    letter-spacing: 1px;
}

/* Form group styling */
.ML-form-group {
    position: relative;
    margin-bottom: 1.5rem;
    text-align: left;
    border: none !important;
}

/* Icon styling */
.ML-icon {
    position: absolute;
    left: 0;
    top: 0.75rem;
    color: rgba(0, 0, 0, 0.5);
    font-size: 1.2rem;
    z-index: 2;
}

/* ===== INPUT FIELD STYLING ===== */
/* Base input styling with gray default border */
.ML-form-control {
    width: 100%;
    padding: 0.75rem 0 0.75rem 2.5rem;
    background-color: transparent;
    color: #333;
    font-size: 1rem;
    transition: border-color 0.3s;
    /* Reset ALL borders */
    border: none !important;
    border-top: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    /* ONLY set bottom border - explicitly gray */
    border-bottom: 1px solid #ccc !important;
    /* Remove any shadows */
    box-shadow: none !important;
    /* Remove browser styling */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

    .ML-form-control:focus {
        border: none !important;
        border-top: 0 !important;
        border-left: 0 !important;
        border-right: 0 !important;
        outline: none !important;
        border-bottom: 2px solid #555 !important;
        box-shadow: none !important;
    }

    .ML-form-control::placeholder {
        color: rgba(0, 0, 0, 0.5);
    }

/* Target specific input types */
input[type="text"].ML-form-control,
input[type="password"].ML-form-control,
input[type="email"].ML-form-control {
    border: none !important;
    border-top: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
    border-bottom: 1px solid #ccc !important;
    box-shadow: none !important;
}

/* ===== VALIDATION STYLES ===== */
/* Invalid state */
.ML-form-control.modified.invalid {
    border: none !important;
    border-top: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 2px solid #dc3545 !important;
    box-shadow: none !important;
}

/* Valid state */
.ML-form-control.modified.valid {
    border: none !important;
    border-top: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 2px solid #42b983 !important;
    box-shadow: none !important;
}

/* Reset single validation class styles */
.ML-form-control.valid:not(.modified),
.ML-form-control.invalid:not(.modified) {
    border: none !important;
    border-top: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid #ccc !important;
    box-shadow: none !important;
}

/* ===== PASSWORD FIELD STYLING ===== */
.ML-password-container {
    position: relative;
    width: 100%;
    border: none !important;
}

    .ML-password-container .ML-form-control {
        border: none !important;
        border-top: 0 !important;
        border-left: 0 !important;
        border-right: 0 !important;
        border-bottom: 1px solid #ccc !important;
        box-shadow: none !important;
    }

        .ML-password-container .ML-form-control.modified.valid {
            border-bottom: 2px solid #42b983 !important;
        }

        .ML-password-container .ML-form-control.modified.invalid {
            border-bottom: 2px solid #dc3545 !important;
        }

.ML-password-toggle {
    position: absolute;
    right: 0;
    top: 0.75rem;
    background: transparent;
    border: none;
    color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: color 0.3s;
    padding: 0.25rem;
    z-index: 2;
}

    .ML-password-toggle:hover {
        color: rgba(0, 0, 0, 0.8);
    }

    .ML-password-toggle:focus {
        outline: none;
    }

/* ===== VALIDATION MESSAGE ===== */
.validation-message {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

/* ===== CHECKBOX STYLING ===== */
.ML-checkbox-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
}

.ML-remember-me {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.7);
}

.ML-remember-checkbox {
    margin-right: 0.5rem;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    border-radius: 2px;
    background-color: transparent;
    display: inline-block;
    position: relative;
    cursor: pointer;
}

    .ML-remember-checkbox:checked::after {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 10px;
        height: 10px;
        background-color: #42b983;
    }

/* ===== FORGOT PASSWORD LINK ===== */
.ML-forgot-password {
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

    .ML-forgot-password:hover {
        color: #000;
    }

/* ===== BUTTON STYLING ===== */
.ML-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    background-color: #e0e0e0;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    margin-top: 1rem;
}

    .ML-btn:hover {
        background-color: #d0d0d0;
    }

    .ML-btn:active {
        transform: translateY(2px);
    }

/* ===== SIGNUP PROMPT ===== */
.ML-signup-prompt {
    margin-top: 2rem;
    color: rgba(0, 0, 0, 0.7);
    font-size: 0.9rem;
}

.ML-signup-link {
    color: #42b983;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

    .ML-signup-link:hover {
        text-decoration: underline;
    }

/* ===== ALERT MESSAGES ===== */
.ML-error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.25rem;
    text-align: left;
}

.ML-info {
    background-color: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.25rem;
    text-align: left;
}

/* ===== PROCESSING STATE ===== */
.ML-btn-processing {
    opacity: 0.7;
    cursor: not-allowed;
}

.ML-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #333;
    animation: ML-spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

@keyframes ML-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== RESPONSIVE STYLING ===== */
@media (max-width: 576px) {
    .ML-card {
        padding: 1.5rem;
    }

    .ML-title {
        font-size: 1.25rem;
    }
}
