/* Custom login styles */
body.login #login,
body.login #login_error,
body.login .message,
body.login .success {
    max-width: 800px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto 20px !important;
    padding: 20px !important;
}

body.login #registerform {
    padding: 20px;
    box-sizing: border-box;
}

body.login .form-row,
body.login #fhc_reg_username_row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row.full-width {
    grid-template-columns: 1fr;
}

.form-row p {
    margin: 0;
}

.required-notice {
    text-align: center;
    margin: 1em 0;
    color: #666;
}

.required-notice p {
    margin: 0;
    font-style: italic;
}

/* Form field styling */
body.login #registerform input[type="text"],
body.login #registerform input[type="email"],
body.login #registerform input[type="tel"],
body.login .form-row input,
body.login #your-profile input[type="text"],
body.login #your-profile input[type="tel"] {
    width: 100% !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
    margin-bottom: 0 !important;
}

body.login #registerform input[type="text"]:focus,
body.login #registerform input[type="email"]:focus,
body.login #registerform input[type="tel"]:focus,
body.login .form-row input:focus,
body.login #your-profile input[type="text"]:focus,
body.login #your-profile input[type="tel"]:focus {
    border-color: #2271b1 !important;
    box-shadow: 0 0 0 1px #2271b1 !important;
    outline: none !important;
}

body.login #registerform input::placeholder {
    color: #666 !important;
}

h3.section-title {
    margin: 25px 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
    color: #444;
    font-size: 1.1em;
}


/* Remove default WordPress form width limits */
body.login {
    background: #f0f0f1;
    width: 100% !important;
    min-width: 320px !important;
    box-sizing: border-box;
}

body.login div#login {
    width: 100% !important;
    max-width: 800px !important;
    padding: 20px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}


/* Hide default WordPress fields */
#registerform > p:nth-of-type(1),
#registerform > p:nth-of-type(2) {
    display: none;
}

/* Hide default WordPress registration message */
#login-message,
.notice-info:not(.message.register) {
    display: none !important;
}

/* Registration message styling */
.message.register:not(#login-message) {
    background-color: #fff !important;
    border-left: 4px solid #00a32a !important;
    padding: 12px !important;
    margin: 20px 0 !important;
    box-shadow: 0 1px 1px rgba(0,0,0,.04) !important;
    display: block !important;
}

.message.register b {
    color: #00a32a;
    font-weight: 600;
}

/* Logo styling */
.login h1 a {
    background-size: contain !important;
    width: 100% !important;
    height: 84px !important;
}

/* Loading animation */
.fhc-loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    z-index: 100;
}

.fhc-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Make sure form is positioned relatively for overlay */
#registerform {
    position: relative;
}
