/**
 * Updated Registration form styles aligned with Breakdance global settings
 */

/* High-specificity selectors to override potential Breakdance element styles */
body .pti-registration-form-wrapper,
.breakdance .pti-registration-form-wrapper,
#page .pti-registration-form-wrapper {
    font-family: 'KhmerOS', sans-serif;
    width: 40%;
    max-width: none;
    margin: 120px auto 2em;
    padding: 2em;
    background: #fff;
    border: 1px solid #333333;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    border-radius: 8px;
}

/* Typography overrides */
body .pti-registration-form-wrapper h1,
body .pti-registration-form-wrapper h2,
body .pti-registration-form-wrapper h3,
body .pti-registration-form-wrapper h4,
body .pti-registration-form-wrapper p,
body .pti-registration-form-wrapper span,
.breakdance .pti-registration-form-wrapper h1,
.breakdance .pti-registration-form-wrapper h2,
.breakdance .pti-registration-form-wrapper h3,
.breakdance .pti-registration-form-wrapper h4,
.breakdance .pti-registration-form-wrapper p,
.breakdance .pti-registration-form-wrapper span {
    font-family: 'KhmerOS', sans-serif;
    color: #333333;
}

/* Label color */
body .pti-registration-form-wrapper label,
.breakdance .pti-registration-form-wrapper label {
    font-family: 'KhmerOS', sans-serif;
    color: #4E3F00;
    font-weight: 700;
}

body .pti-registration-form,
.breakdance .pti-registration-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;
}

/* Input fields styling */
body .pti-form-row input[type="text"],
body .pti-form-row input[type="email"],
body .pti-form-row input[type="password"],
.breakdance .pti-form-row input[type="text"],
.breakdance .pti-form-row input[type="email"],
.breakdance .pti-form-row input[type="password"] {
    font-family: 'KhmerOS', sans-serif;
    padding: 14px 16px;
    border: 1px solid #333333;
    background: #FFFFFF;
    color: #333333;
    font-size: 1em;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    border-radius: 8px;
    box-sizing: border-box;
}

body .pti-form-row input[type="text"]:focus,
body .pti-form-row input[type="email"]:focus,
body .pti-form-row input[type="password"]:focus,
.breakdance .pti-form-row input[type="text"]:focus,
.breakdance .pti-form-row input[type="email"]:focus,
.breakdance .pti-form-row input[type="password"]:focus {
    outline: none;
    border-color: #4E3F00;
    box-shadow: 0 0 0 2px rgba(78, 63, 0, 0.2);
}

/* Checkbox and Radio styling */
body .pti-checkbox-label,
.breakdance .pti-checkbox-label,
body .pti-radio-label,
.breakdance .pti-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
    cursor: pointer;
}

body .pti-checkbox-label input[type="checkbox"],
.breakdance .pti-checkbox-label input[type="checkbox"],
body .pti-radio-label input[type="radio"],
.breakdance .pti-radio-label input[type="radio"] {
    margin-top: 0.25em;
    accent-color: #4f843b;
}

body .pti-checkbox-label span,
.breakdance .pti-checkbox-label span,
body .pti-radio-label span,
.breakdance .pti-radio-label span {
    font-size: 0.9em;
    color: #333333;
}

.pti-radio-group {
    display: flex;
    gap: 1.5em;
}

/* Submit Button Styling */
body .pti-submit-button,
.breakdance .pti-submit-button {
    font-family: 'KhmerOS', sans-serif;
    background: #4f843b;
    color: #FFFFFF;
    border: none;
    padding: 14px 32px;
    font-size: 1em;
    font-weight: 400;
    line-height: 1.7;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
    transition: background-color 0.3s ease;
    border-radius: 8px;
    text-align: center;
    display: inline-block;
    width: auto;
}

body .pti-submit-button:hover,
.breakdance .pti-submit-button:hover {
    background: #254117;
    color: #FFFFFF;
}

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;
}

body .pti-field-message.error,
.breakdance .pti-field-message.error {
    color: #dc3232;
}

body .pti-field-message.success,
.breakdance .pti-field-message.success {
    color: #46b450;
}

/* Global Form Message */
body .pti-form-message,
.breakdance .pti-form-message {
    text-align: center;
    font-weight: 500;
    min-height: 1.5em;
    margin-top: 1em;
}

body .pti-form-message.error,
.breakdance .pti-form-message.error {
    color: #dc3232;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 0.75em;
    border-radius: 4px;
}

body .pti-form-message.success,
.breakdance .pti-form-message.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 0.75em;
    border-radius: 4px;
}

/* Required indicator */
body .required,
.breakdance .required {
    color: #dc3232;
    margin-left: 2px;
}

.hidden {
    display: none !important;
}

/* Toggle Button Styling */
.pti-registration-form-wrapper .pti-toggle-group {
    display: flex;
    border: 1px solid #333333;
    border-radius: 8px;
    overflow: hidden;
}

.pti-registration-form-wrapper .pti-toggle-button {
    flex: 1;
    padding: 10px;
    background-color: #f0f0f0;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s;
    font-family: 'KhmerOS', sans-serif;
    color: #333333;
    font-weight: 700;
}

.pti-registration-form-wrapper .pti-toggle-button.active {
    background-color: #4f843b;
    color: #FFFFFF;
}

.pti-registration-form-wrapper .pti-toggle-button:not(.active):hover {
    background-color: #e0e0e0;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {

    body .pti-registration-form-wrapper,
    .breakdance .pti-registration-form-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;
    }

    body .pti-form-row input[type="text"],
    body .pti-form-row input[type="email"],
    body .pti-form-row input[type="password"],
    .breakdance .pti-form-row input[type="text"],
    .breakdance .pti-form-row input[type="email"],
    .breakdance .pti-form-row input[type="password"] {
        padding: 12px 14px;
    }

    body .pti-submit-button,
    .breakdance .pti-submit-button {
        padding: 12px 24px;
        width: 100%;
        box-sizing: border-box;
    }
}