/* Dynamic Contact Form Premium Styles */

.ps-contact-form {
    padding: 60px 0;
    background-color: #f7f9fa;
}

.ps-contact-form .contact-title {
    font-size: 32px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: -0.5px;
}

.ps-contact-form .contact-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 45px 50px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.01);
}

.ps-contact-form .contact-desc {
    font-size: 14.5px;
    line-height: 1.65;
    color: #444444;
    margin-bottom: 35px;
    text-align: left;
}

/* Dynamic field wrappers */
.ps-contact-form .contact-form-group {
    margin-bottom: 22px;
    position: relative;
    width: 100%;
}

/* Dynamic input fields (inputs, select dropdowns, textareas) */
.ps-contact-form .form-control {
    width: 100% !important;
    height: 48px !important;
    background-color: #ffffff !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    color: #333333 !important;
    padding: 10px 16px;
    transition: all 0.2s ease-in-out !important;
    outline: none !important;
    box-shadow: none !important;
}

.ps-contact-form .form-control:focus {
    border-color: var(--primary-color, #a23c3c) !important;
    box-shadow: 0 0 0 4px rgba(162, 200, 28, 0.12) !important;
}

/* Floating labels: the label rests inside the field and, on focus or once
   filled, shrinks onto the top border. The required asterisk is the label's
   `.required:after`, so it travels with it. Placeholders stay in the markup
   (`:placeholder-shown` is how "empty" is detected) but are hidden. */
.ps-contact-form .contact-form-group:has(.form-control) > label {
    position: absolute;
    top: 24px;
    left: 12px;
    z-index: 2;
    margin: 0;
    padding: 0 4px;
    background-color: #ffffff;
    color: #777777;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    pointer-events: none;
    transform: translateY(-50%);
    transition: top 0.15s ease, font-size 0.15s ease, color 0.15s ease;
}

.ps-contact-form .contact-form-group:has(.form-control):focus-within > label,
.ps-contact-form .contact-form-group:has(.form-control:not(:placeholder-shown)) > label,
/* Selects and the phone input (flag/dial-code padding) never have a free "resting" spot. */
.ps-contact-form .contact-form-group:has(select.form-control) > label,
.ps-contact-form .contact-form-group:has(.iti) > label {
    top: 0;
    font-size: 12px;
}

.ps-contact-form .contact-form-group:has(.form-control:-webkit-autofill) > label {
    top: 0;
    font-size: 12px;
}

.ps-contact-form .contact-form-group:has(.form-control):focus-within > label {
    color: var(--primary-color, #a23c3c);
}

.ps-contact-form .contact-form-group:not(:has(.iti)) .form-control::placeholder {
    color: transparent;
}

/* Dynamic Textarea Styling */
.ps-contact-form textarea {
    height: 130px !important;
    padding: 12px 16px !important;
    resize: vertical !important;
}

/* International Phone Input compatibility */
.ps-contact-form .iti {
    display: block;
    width: 100%;
}

/* Dynamic submit button styling */
.ps-contact-form .contact-submit-row {
    margin-top: 30px;
    margin-bottom: 10px;
    text-align: center;
}

.ps-contact-form .btn-submit-message {
    background-color: var(--primary-color, #a23c3c) !important;
    color: #000000 !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 14px 38px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.25s ease !important;
    cursor: pointer;
    display: inline-block;
    outline: none !important;
}

.ps-contact-form .btn-submit-message:hover {
    background-color: var(--header-text-hover-color) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
    transform: translateY(-1px);
}

.ps-contact-form .btn-submit-message:active {
    transform: translateY(0);
}

/* Responsive scaling rules */
@media (max-width: 768px) {
    .ps-contact-form .contact-card {
        padding: 30px 20px;
    }
}
