/* General styling for the login form wrapper */
.my-custom-login-form-wrapper {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    z-index: 10; /* Ensure form is above background */
}

/* Full page background styling (applied to body via Elementor controls) */
body {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    min-height: 100vh; /* Ensure body takes full viewport height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Pseudo-element for background opacity and blend mode */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0); /* Default, will be overridden by Elementor */
    z-index: -1;
}

/* Hide header and footer for the specific page */
/* These rules now depend on the .my-custom-login-page-hide-header-footer class being on the body */
.my-custom-login-page-hide-header-footer header,
.my-custom-login-page-hide-header-footer footer,
.my-custom-login-page-hide-header-footer .site-header, /* Common theme selectors */
.my-custom-login-page-hide-header-footer .site-footer,
.my-custom-login-page-hide-header-footer #masthead,
.my-custom-login-page-hide-header-footer #colophon,
.my-custom-login-page-hide-header-footer .elementor-location-header, /* Elementor specific */
.my-custom-login-page-hide-header-footer .elementor-location-footer {
    display: none !important;
}

/* Headings and description */
.my-custom-login-heading {
    font-size: 2em;
    margin-bottom: 10px;
    color: #333;
}

.my-custom-login-description {
    font-size: 1em;
    color: #666;
    margin-bottom: 20px;
}

/* Form fields */
.my-custom-login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.my-custom-login-field {
    position: relative;
    margin-bottom: 15px;
}

/* More specific selectors for inputs */
.my-custom-login-form-wrapper .my-custom-login-field input[type="text"],
.my-custom-login-form-wrapper .my-custom-login-field input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
    background-color: #f9f9f9;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.my-custom-login-form-wrapper .my-custom-login-field input[type="text"]:focus,
.my-custom-login-form-wrapper .my-custom-login-field input[type="password"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
    outline: none;
}

/* Animated Labels */
.my-custom-login-form-wrapper .my-custom-login-label {
    position: absolute;
    left: 15px;
    top: 12px; /* Initial position, aligned with placeholder */
    color: #999;
    font-size: 1em;
    pointer-events: none;
    transition: all 0.2s ease-out;
    background-color: transparent; /* Ensure no background interferes */
    padding: 0 5px;
    z-index: 1;
}

/* Label animation when input is focused or has content */
.my-custom-login-form-wrapper .my-custom-login-field.has-focus .my-custom-login-label,
.my-custom-login-form-wrapper .my-custom-login-field input:not(:placeholder-shown) + .my-custom-login-label { /* Added has-focus for JS control */
    top: -10px; /* Move label up */
    left: 10px;
    font-size: 0.8em;
    color: #0073aa;
    background-color: #ffffff; /* Match form background */
    padding: 0 5px;
}

/* Placeholder text fading */
.my-custom-login-form-wrapper .my-custom-login-field input::placeholder { /* Generalize */
    transition: opacity 0.2s ease-out;
    opacity: 1;
}

.my-custom-login-form-wrapper .my-custom-login-field input:focus::placeholder { /* Generalize */
    opacity: 0; /* Fade out placeholder on focus */
}

/* Submit button */
.my-custom-login-submit-button {
    width: 100%;
    padding: 12px 20px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.my-custom-login-submit-button:hover {
    background-color: #005177;
}

.my-custom-login-submit-button:active {
    transform: translateY(1px);
}

/* Error message */
.my-custom-login-error-message {
    color: #dc3232;
    font-size: 0.9em;
    margin-bottom: 15px;
    text-align: left;
    padding: 5px 0;
}

/* Error input styling */
.my-custom-login-form-wrapper .my-custom-login-field input.input-error {
    border-color: #dc3232;
    box-shadow: 0 0 0 2px rgba(220, 50, 50, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .my-custom-login-form-wrapper {
        margin: 30px auto;
        padding: 20px;
    }

    .my-custom-login-heading {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    .my-custom-login-form-wrapper {
        margin: 20px 15px;
        padding: 15px;
    }

    .my-custom-login-heading {
        font-size: 1.5em;
    }

    .my-custom-login-form-wrapper .my-custom-login-field input[type="text"],
    .my-custom-login-form-wrapper .my-custom-login-field input[type="password"],
    .my-custom-login-submit-button {
        padding: 10px 12px;
        font-size: 0.95em;
    }
}
