/**
 * MW Marketing Contact Form Styles
 *
 * @package MW_Marketing
 * @version 1.0.0
 *
 * Brand Colors:
 * Primary: #3533CD
 * Secondary: #F2F2F2
 * Text: #000000
 * Accent: #313131
 *
 * Fonts:
 * Primary: Roboto 600
 * Text: Roboto 400
 * Accent: Roboto 500
 */

/* ========================================
   Form Wrapper & Container
   ======================================== */

.mw-contact-form-wrapper {
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 0 0 100px 0;
}

/* Padding for /contact/ page */
body.page-template-default.page .mw-contact-form-wrapper,
body.page .mw-contact-form-wrapper {
    padding: 80px 0;
}

@media (max-width: 768px) {
    body.page-template-default.page .mw-contact-form-wrapper,
    body.page .mw-contact-form-wrapper {
        padding: 40px 0;
    }
}

.mw-contact-container {
    display: grid;
    grid-template-columns: 0.8fr 1fr;
    gap: 60px;
    align-items: center;
}

@media (max-width: 992px) {
    .mw-contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ========================================
   Left Column: Contact Info
   ======================================== */

.mw-contact-info {
    padding: 40px 0;
}

.mw-contact-heading {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 60px;
    line-height: 1.2em;
    color: #FFFFFF;
    margin: 0 0 20px 0;
}

.mw-contact-subheading {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.6;
    color: #E0E0E0;
    margin: 0 0 50px 0;
}

.mw-contact-people {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.mw-contact-person {
    padding: 0;
}

.mw-person-name {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #FFFFFF;
    margin: 0 0 6px 0;
}

.mw-person-role {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: #B8B6FF;
    margin: 0 0 12px 0;
}

.mw-person-contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mw-contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: #FFFFFF !important;
    text-decoration: none;
}

.mw-contact-link svg {
    flex-shrink: 0;
    color: #B8B6FF;
}

@media (max-width: 768px) {
    .mw-contact-heading {
        font-size: 32px;
    }

    .mw-contact-subheading {
        font-size: 16px;
        margin-bottom: 35px;
    }

    .mw-contact-info {
        padding: 20px 0;
    }
}

/* ========================================
   Right Column: Form
   ======================================== */

.mw-contact-form-column {
    background: #FFFFFF;
    padding: 24px;
    border-radius: 25px;
}

@media (max-width: 768px) {
    .mw-contact-form-column {
        padding: 24px;
    }
}

/* ========================================
   Messages
   ======================================== */

.mw-form-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 8px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.5;
}

.mw-form-success {
    background: #E8F5E9;
    color: #2E7D32;
    border-left: 4px solid #4CAF50;
}

.mw-form-error {
    background: #FFEBEE;
    color: #C62828;
    border-left: 4px solid #F44336;
}

.mw-form-icon {
    flex-shrink: 0;
}

.mw-form-message p {
    margin: 0;
}

/* ========================================
   Form Groups
   ======================================== */

.mw-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .mw-form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.mw-form-group {
    margin-bottom: 10px;
    position: relative;
}

.mw-form-row .mw-form-group {
    margin-bottom: 0;
}

.mw-form-label {
    position: absolute;
    left: 0;
    top: 26px;
    padding: 0 !important;
    margin: 0 !important;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #9E9E9E;
    line-height: 1.5;
    pointer-events: none;
    transition: all 0.3s ease;
    transform-origin: left top;
}

.mw-form-label.mw-label-float {
    transform: translateY(-20px) scale(0.85);
    color: #3533CD;
}

/* Label for Budget Slider - match floating label style */
.mw-form-group:has(.mw-slider-container) .mw-form-label {
    position: static;
    display: block;
    margin-bottom: 8px !important;
    color: #9E9E9E;
    font-weight: 700;
}

.mw-required {
    color: #3533CD;
    font-weight: 600;
}

/* ========================================
   Form Controls
   ======================================== */

.mw-form-control {
    width: 100%;
    height: unset !important;
    min-height: 0 !important;
    padding: 24px 0 5px 0 !important;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.5 !important;
    color: #424242 !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #E0E0E0 !important;
    border-radius: 0 !important;
    transition: all 0.3s ease;
    outline: none;
}

.mw-form-control:hover {
    border-bottom-color: #BDBDBD !important;
}

.mw-form-control:focus {
    border-bottom-color: #3533CD !important;
    box-shadow: none !important;
}

.mw-form-control::placeholder {
    color: transparent !important;
    font-size: 14px;
}

.mw-form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* ========================================
   Budget Slider
   ======================================== */

.mw-slider-container {
    display: flex;
    align-items: center;
    gap: 0px;
    padding: 10px 0;
}

.mw-slider-wrapper {
    flex: 0 0 70%;
}

.mw-budget-slider {
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, #E0E0E0 0%, #3533CD 100%);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.mw-budget-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #3533CD;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(53, 51, 205, 0.3);
    transition: all 0.2s ease;
}

.mw-budget-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(53, 51, 205, 0.4);
}

.mw-budget-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #3533CD;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(53, 51, 205, 0.3);
    transition: all 0.2s ease;
}

.mw-budget-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(53, 51, 205, 0.4);
}

.mw-budget-value {
    flex: 0 0 30%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #3533CD;
    white-space: nowrap;
}

.mw-budget-input {
    width: 140px;
    text-align: right;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #3533CD !important;
    background: transparent !important;
    border: none !important;
    outline: none;
    padding: 0;
    padding-right: 4px;
    -webkit-text-fill-color: #3533CD !important;
}

.mw-budget-input:focus {
    outline: 2px solid #3533CD;
    outline-offset: 2px;
    border-radius: 4px;
    padding: 2px 4px;
}

.mw-budget-currency {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #3533CD;
}

/* ========================================
   Interest Selection (Pills)
   ======================================== */

.mw-interest-group {
    margin-bottom: 32px;
}

.mw-interest-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.mw-interest-option {
    cursor: pointer;
}

.mw-interest-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mw-interest-pill {
    display: inline-block;
    padding: 10px 20px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #313131;
    background: #F2F2F2;
    border: 2px solid transparent;
    border-radius: 24px;
    transition: all 0.3s ease;
    user-select: none;
}

.mw-interest-option:hover .mw-interest-pill {
    background: #E8E8E8;
}

.mw-interest-option input[type="radio"]:checked + .mw-interest-pill {
    background: #3533CD;
    color: #FFFFFF;
    border-color: #3533CD;
    box-shadow: 0 4px 12px rgba(53, 51, 205, 0.25);
}

.mw-interest-option input[type="radio"]:focus + .mw-interest-pill {
    outline: 2px solid #3533CD;
    outline-offset: 2px;
}

@media (max-width: 576px) {
    .mw-interest-pill {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ========================================
   Checkbox (GDPR)
   ======================================== */

.mw-checkbox-group {
    margin-top: 20px;
    margin-bottom: 28px;
}

.mw-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.mw-checkbox-label input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    background-color: #FFFFFF;
    border: 2px solid #E0E0E0 !important;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.mw-checkbox-label input[type="checkbox"]:checked {
    background-color: #3533CD;
    border-color: #3533CD !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Cpath d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

.mw-checkbox-label input[type="checkbox"].mw-error {
    border-color: #F44336 !important;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.mw-checkbox-text {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #9E9E9E;
    line-height: 1.6;
}

.mw-checkbox-text a {
    color: #3533CD;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.mw-checkbox-text a:hover {
    color: #2825A3;
}

/* ========================================
   Field Validation
   ======================================== */

.mw-form-control.mw-error,
.mw-interest-option input[type="radio"]:invalid:checked + .mw-interest-pill {
    border-color: #F44336;
}

.mw-form-control.mw-error:focus {
    box-shadow: 0 0 0 4px rgba(244, 67, 54, 0.1);
}

.mw-field-error {
    display: block;
    margin-top: 6px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: #F44336;
    line-height: 1.4;
}

.mw-field-error:empty {
    display: none;
}

/* ========================================
   Submit Button
   ======================================== */

.mw-form-submit {
    margin-top: 32px;
}

.mw-contact-form .mw-submit-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 20px 40px !important;
    font-family: 'Roboto', sans-serif !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    color: #FFFFFF !important;
    fill: #FFFFFF !important;
    background-color: #3533CD !important;
    border: none !important;
    border-radius: 15px !important;
    box-shadow: 0px 0px 10px 0px rgba(255, 255, 255, 0.5) !important;
    cursor: pointer !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: all 0.3s !important;
    position: relative !important;
    overflow: hidden !important;
}

.mw-contact-form .mw-submit-button:hover,
.mw-contact-form .mw-submit-button:focus {
    background-color: #2826A2 !important;
    color: #FFFFFF !important;
    fill: #FFFFFF !important;
}

.mw-submit-button:active {
    transform: translateY(1px);
}

.mw-submit-button:disabled {
    background: #BDBDBD;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mw-button-icon {
    transition: transform 0.3s ease;
}

.mw-submit-button:hover .mw-button-icon {
    transform: translateX(4px);
}

.mw-submit-button:disabled .mw-button-icon {
    display: none;
}

/* Loading Spinner */
.mw-spinner {
    animation: mw-spin 1s linear infinite;
}

@keyframes mw-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Honeypot (Hidden)
   ======================================== */

.mw-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ========================================
   Focus Visible (Accessibility)
   ======================================== */

.mw-submit-button:focus-visible,
.mw-form-control:focus-visible,
.mw-checkbox-label input[type="checkbox"]:focus-visible,
.mw-interest-option input[type="radio"]:focus-visible + .mw-interest-pill {
    outline: 2px solid #3533CD;
    outline-offset: 2px;
}

/* ========================================
   Loading State
   ======================================== */

.mw-contact-form.mw-loading .mw-submit-button {
    pointer-events: none;
}

.mw-contact-form.mw-loading .mw-button-text,
.mw-contact-form.mw-loading .mw-button-icon {
    display: none;
}

.mw-contact-form.mw-loading .mw-button-loader {
    display: inline-flex !important;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .mw-contact-form-wrapper {
        padding: 1.25rem;
    }

    .mw-form-group {
        margin-bottom: 20px;
    }

    .mw-interest-options {
        gap: 8px;
    }

    .mw-submit-button {
        padding: 14px 24px;
        font-size: 15px;
    }

    /* Budget slider - stack value above slider */
    .mw-slider-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .mw-slider-wrapper {
        flex: 0 0 100%;
        width: 100%;
    }

    .mw-budget-value {
        flex: 0 0 auto;
        justify-content: flex-start;
        width: 100%;
        order: -1;
        font-size: 32px !important;
        gap: 0px !important;
    }

    .mw-budget-input {
        width: 110px;
        text-align: left;
        font-size: 32px !important;
        color: #3533CD !important;
        font-weight: 700 !important;
        padding-right: 4px !important;
    }

    .mw-budget-currency {
        font-size: 32px !important;
        color: #3533CD !important;
        font-weight: 700 !important;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .mw-contact-form-wrapper {
        box-shadow: none;
    }

    .mw-submit-button {
        display: none;
    }
}
