/**
 * Updated Forgot password form styles aligned with Breakdance global settings
 * Global Palette Reference:
 * - Primary: #4E3F00 (Olive Brown) - Used for Headings/Labels
 * - Accent: #254117 (Deep Forest Green) - Used for Links
 * - Highlight: #D4AF37 (Muted Gold)
 * - Background: #F9F5E7 (Warm Ivory)
 * - Text: #333333 (Dark Charcoal)
 * - White: #FFFFFF
 * - Button Primary BG: #4f843b (Green)
 * - Button Primary Hover BG: #254117 (Darker Green)
 * - Button Corners: 8px
 * - Form Field Border: #333333
 * - Form Field Corners: 8px
 */

/* Add KhmerOS font (matches global setting) */

/* Hide WordPress admin bar */
html {
    margin-top: 0 !important;
}

body.admin-bar {
    margin-top: -32px;
    /* Adjust if admin bar is shown */
}

#wpadminbar {
    display: none !important;
}

/* High-specificity selectors to override potential Breakdance element styles */
body .pti-forgot-password-wrapper,
.breakdance .pti-forgot-password-wrapper,
#page .pti-forgot-password-wrapper {
    font-family: 'KhmerOS', sans-serif;
    /* Matches global */
    width: 40%;
    /* Force width to fill parent */
    max-width: none;
    /* Remove max-width limit */
    margin: 120px auto 2em;
    /* Center horizontally */
    padding: 2em;
    /* Reverted padding */
    background: #fff;
    /* Keep distinct white wrapper for form clarity */
    border: 1px solid #333333;
    /* Updated border color */
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);
    /* Keep shadow */
    position: relative;
    z-index: 1;
    border-radius: 8px;
    /* Added subtle rounding to wrapper */
}

/* Typography overrides - Use global text color */
body .pti-forgot-password-wrapper h1,
body .pti-forgot-password-wrapper h2,
body .pti-forgot-password-wrapper h3,
body .pti-forgot-password-wrapper h4,
body .pti-forgot-password-wrapper p,
body .pti-forgot-password-wrapper span,
.breakdance .pti-forgot-password-wrapper h1,
.breakdance .pti-forgot-password-wrapper h2,
.breakdance .pti-forgot-password-wrapper h3,
.breakdance .pti-forgot-password-wrapper h4,
.breakdance .pti-forgot-password-wrapper p,
.breakdance .pti-forgot-password-wrapper span {
    font-family: 'KhmerOS', sans-serif;
    /* Matches global */
    color: #333333;
    /* Updated to global text color */
}

/* Label color - Using global heading color */
body .pti-forgot-password-wrapper label,
.breakdance .pti-forgot-password-wrapper label {
    font-family: 'KhmerOS', sans-serif;
    /* Matches global */
    color: #4E3F00;
    /* Updated to global heading color */
    font-weight: 700;
    /* Matches H4/Label preset */
}

body .pti-forgot-password-form,
body .pti-reset-password-form,
.breakdance .pti-forgot-password-form,
.breakdance .pti-reset-password-form {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

body .pti-form-row,
.breakdance .pti-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    /* Reverted gap */
}

/* Input fields styling - Aligned with global form field settings */
body .pti-form-row input[type="email"],
body .pti-form-row input[type="password"],
.breakdance .pti-form-row input[type="email"],
.breakdance .pti-form-row input[type="password"] {
    font-family: 'KhmerOS', sans-serif;
    /* Matches global */
    padding: 14px 16px;
    /* Adjusted padding */
    border: 1px solid #333333;
    /* Updated border color */
    background: #FFFFFF;
    /* Matches global */
    color: #333333;
    /* Matches global text color */
    font-size: 1em;
    /* Keep original size or adjust if needed */
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    /* Added box-shadow transition */
    border-radius: 8px;
    /* Added border-radius */
    box-sizing: border-box;
    /* Added for consistent padding */
}

body .pti-form-row input[type="email"]:focus,
body .pti-form-row input[type="password"]:focus,
.breakdance .pti-form-row input[type="email"]:focus,
.breakdance .pti-form-row input[type="password"]:focus {
    outline: none;
    border-color: #4E3F00;
    /* Updated focus color (using Primary) */
    box-shadow: 0 0 0 2px rgba(78, 63, 0, 0.2);
    /* Added focus ring effect */
}

/* Submit Button Styling - Aligned with global primary button */
body .pti-submit-button,
.breakdance .pti-submit-button {
    font-family: 'KhmerOS', sans-serif;
    /* Matches global */
    background: #4f843b;
    /* Updated background color */
    color: #FFFFFF;
    /* Matches global */
    border: none;
    padding: 14px 32px;
    /* Updated padding */
    font-size: 1em;
    /* Keep original size */
    font-weight: 400;
    /* Matches global Body preset */
    line-height: 1.7;
    /* Matches global Body preset */
    cursor: pointer;
    text-transform: none;
    /* Removed uppercase */
    letter-spacing: normal;
    /* Removed letter-spacing */
    transition: background-color 0.3s ease;
    /* Updated transition property */
    border-radius: 8px;
    /* Added border-radius */
    text-align: center;
    display: inline-block;
    width: auto;
    /* Allow button to size naturally */
}

body .pti-submit-button:hover,
.breakdance .pti-submit-button:hover {
    background: #254117;
    /* Updated hover background color */
    color: #FFFFFF;
    /* Ensure text color stays white */
}

body .pti-submit-button:disabled,
.breakdance .pti-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Field Messages */
body .pti-field-message,
.breakdance .pti-field-message {
    font-size: 0.9em;
    min-height: 1.5em;
    color: #333333;
    /* Default text color */
}

body .pti-field-message.error,
.breakdance .pti-field-message.error {
    color: #dc3232;
    /* Keep error color */
}

body .pti-field-message.success,
.breakdance .pti-field-message.success {
    color: #46b450;
    /* Keep success color */
}

/* Global Form Message */
body .pti-form-message,
.breakdance .pti-form-message {
    text-align: center;
    font-weight: 500;
    min-height: 1.5em;
    margin-top: 1em;
    /* Added margin for spacing */
}

body .pti-form-message.error,
.breakdance .pti-form-message.error {
    color: #dc3232;
    /* Keep error color */
    background-color: #f8d7da;
    /* Add light background for visibility */
    border: 1px solid #f5c6cb;
    padding: 0.75em;
    border-radius: 4px;
}

body .pti-form-message.success,
.breakdance .pti-form-message.success {
    color: #155724;
    /* Keep success color */
    background-color: #d4edda;
    /* Add light background for visibility */
    border: 1px solid #c3e6cb;
    padding: 0.75em;
    border-radius: 4px;
}

/* Links styling - Aligned with global link color */
body .pti-form-links,
.breakdance .pti-form-links {
    text-align: center;
    margin-top: 1.5em;
    /* Increased margin */
}

body .pti-login-prompt,
/* Class used in forgot-password template */
.breakdance .pti-login-prompt {
    margin-top: 1em;
    font-size: 0.9em;
    color: #333333;
    /* Updated text color */
}

body .pti-login-prompt a,
.breakdance .pti-login-prompt a {
    color: #254117;
    /* Updated link color */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

body .pti-login-prompt a:hover,
.breakdance .pti-login-prompt a:hover {
    color: #1e3a14;
    /* Updated link hover color */
    text-decoration: underline;
}

/* Required indicator */
body .required,
.breakdance .required {
    color: #dc3232;
    /* Keep error color for required indicator */
    margin-left: 2px;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {

    body .pti-forgot-password-wrapper,
    .breakdance .pti-forgot-password-wrapper {
        width: 90% !important;
        max-width: 90% !important;
        margin: 80px auto 1em !important;
        padding: 1.5em 1em;
        box-sizing: border-box !important;
    }

    body .pti-form-row,
    .breakdance .pti-form-row {
        gap: 0.3em;
    }

    /* Adjust padding for smaller screens if needed */
    body .pti-form-row input[type="email"],
    body .pti-form-row input[type="password"],
    .breakdance .pti-form-row input[type="email"],
    .breakdance .pti-form-row input[type="password"] {
        padding: 12px 14px;
        /* Slightly reduced padding */
    }

    body .pti-submit-button,
    .breakdance .pti-submit-button {
        padding: 12px 24px;
        /* Slightly reduced padding */
        width: 100%;
        /* Make button full width on small screens */
        box-sizing: border-box;
    }

    body .pti-form-links,
    .breakdance .pti-form-links {
        font-size: 0.9em;
        /* Slightly smaller links on mobile */
    }

    /* Center the parent Breakdance container on mobile */
    .bde-code-block:has(> .pti-forgot-password-wrapper) {
        align-items: center !important;
        /* Override flex-start */
    }
}