/* ==========================================
   TYPO3 fe_login Bootstrap 5 Engine
   Targeting: .frame-type-felogin_login
   ========================================== */

/* Outer Content Element Wrap (Simulates a Bootstrap Card) */
.frame-type-felogin_login {
    display: block;
    max-width: 450px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Header Adjustments */
.frame-type-felogin_login h3,
.frame-type-felogin_login h4 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    line-height: 1.2;
    color: #212529;
}

/* Form Layout Container */
.frame-type-felogin_login form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Form Item Wrappers (Simulates .mb-3) */
.frame-type-felogin_login .felogin-fieldname,
.frame-type-felogin_login div[class*="felogin-"] {
    display: flex;
    flex-direction: column;
}

/* Input Labels (Simulates .form-label) */
.frame-type-felogin_login label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
}

/* Text & Password Inputs (Simulates .form-control) */
.frame-type-felogin_login input[type="text"],
.frame-type-felogin_login input[type="password"] {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    appearance: none;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Input Focus States */
.frame-type-felogin_login input[type="text"]:focus,
.frame-type-felogin_login input[type="password"]:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Checkbox alignment wrapper (Simulates .form-check) */
.frame-type-felogin_login .felogin-password-forget,
.frame-type-felogin_login div:has(input[type="checkbox"]) {
    flex-direction: row !important;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

/* Checkbox Inputs (Simulates .form-check-input) */
.frame-type-felogin_login input[type="checkbox"] {
    width: 1em;
    height: 1em;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid rgba(0, 0, 0, 0.25);
    appearance: none;
    border-radius: 0.25rem;
    print-color-adjust: exact;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

.frame-type-felogin_login input[type="checkbox"]:checked {
    background-color: #0d66fd;
    border-color: #0d66fd;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://w3.org' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

/* Checkbox Labels */
.frame-type-felogin_login input[type="checkbox"] + label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 400;
}

/* Submit Button (Simulates .btn .btn-primary .w-100) */
.frame-type-felogin_login input[type="submit"] {
    display: inline-block;
    width: 100%;
    font-weight: 400;
    line-height: 1.5;
    color: #fff;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: #0d6efd;
    border: 1px solid #0d6efd;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    margin-top: 0.5rem;
}

.frame-type-felogin_login input[type="submit"]:hover {
    color: #fff;
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Links (Forgot Password, etc.) */
.frame-type-felogin_login a {
    color: #0d6efd;
    text-decoration: underline;
    font-size: 0.875rem;
}

.frame-type-felogin_login a:hover {
    color: #0a58ca;
}

/* System Messages & Validation States */
.frame-type-felogin_login p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

/* Error/Alert Message Boxes (Simulates .alert .alert-danger) */
.frame-type-felogin_login .felogin-error, 
.frame-type-felogin_login div[class*="error"] p {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}
