/* Marketo Modal */
.mkto-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.mkto-modal.is-open {
    display: flex;
}

body.mkto-modal-open {
    overflow: hidden;
}

.mkto-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.mkto-modal__dialog {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 48px 30px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.mkto-modal__close {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 0 !important;
    color: #000;
    z-index: 2;
    box-shadow: none !important;
    outline: none !important;
}
.mkto-modal__close:hover,
.mkto-modal__close:focus,
.mkto-modal__close:active {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    color: #000;
}

.mkto-modal__inner {
    position: relative;
}

.mkto-modal__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #000;
    text-align: center;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 0.5px;
}
.mkto-modal__title:empty {
    display: none;
}

.mkto-modal__desc {
    color: #000;
    margin: 0 0 24px;
    text-align: center;
    font-size: 1rem;
    line-height: 1.4;
}
.mkto-modal__desc:empty {
    display: none;
}

.mkto-modal__loading {
    text-align: center;
    color: #666;
    padding: 20px 0;
    font-size: 0.9rem;
}

/* Marketo form styling — matches the site's existing inline form CSS */
.mkto-modal .mktoForm input[type=text],
.mkto-modal .mktoForm input[type=url],
.mkto-modal .mktoForm input[type=email],
.mkto-modal .mktoForm input[type=tel],
.mkto-modal .mktoForm input[type=number],
.mkto-modal .mktoForm input[type=date],
.mkto-modal .mktoForm textarea.mktoField,
.mkto-modal .mktoForm select.mktoField {
    border-radius: 6px;
    border-color: #e9e9e9;
    border-width: thin;
    padding: 10px 6px !important;
    background: #f9f9f9;
}
.mkto-modal .mktoForm .mktoRequiredField label.mktoLabel {
    font-weight: normal;
    font-size: 14px;
}
.mkto-modal .mktoForm button.mktoButton {
    width: 100%;
}
.mkto-modal .mktoForm fieldset #form-privacy {
    font-size: 12px;
    color: #4c4c4c;
}
.mkto-modal .mktoForm {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}
.mkto-modal .mktoForm.mktoHasWidth .mktoFieldDescriptor.mktoFormCol {
    width: 48% !important;
    float: left;
}

/* Fields the modal JS pairs into one line get wrapped in .mkto-side-by-side.
   This wrapper is ONLY created for forms listed in marketo-modal.js (FIELD_PAIRS),
   so no other form is affected. Flexbox makes the two rows share the line cleanly,
   regardless of Marketo's row/clear structure. */
.mkto-modal .mkto-side-by-side {
    display: flex;
    gap: 16px;
}
.mkto-modal .mkto-side-by-side > .mktoFormRow {
    flex: 1 1 0;
    width: auto !important;
    margin: 0 !important;
    clear: none !important;
}
.mkto-modal .mkto-side-by-side > .mktoFormRow .mktoFieldDescriptor.mktoFormCol {
    width: 100% !important;
    float: none !important;
}
.mkto-modal .mkto-side-by-side > .mktoFormRow .mktoField,
.mkto-modal .mkto-side-by-side > .mktoFormRow .mktoFieldWrap {
    width: 100% !important;
    box-sizing: border-box;
}
.mkto-modal .mkto-side-by-side > .mktoFormRow .mktoLabel {
    width: auto !important;
}

/* Fields the modal JS flags as full width (e.g. the email-consent question).
   Selector includes .mktoForm.mktoHasWidth so it outranks the 48% column rule. */
.mkto-modal .mktoForm.mktoHasWidth .mktoFieldDescriptor.mktoFormCol.mkto-full-width {
    width: 100% !important;
    float: none !important;
    clear: both !important;
}
.mkto-modal .mktoForm.mktoHasWidth .mktoFieldDescriptor.mktoFormCol.mkto-full-width .mktoLabel {
    width: auto !important;
}

@media (max-width: 600px) {
    .mkto-modal .mktoForm.mktoHasWidth .mktoFieldDescriptor.mktoFormCol {
        width: 100% !important;
        float: none !important;
        clear: both;
    }
    .mkto-modal .mktoForm .mktoFormRow {
        display: block;
        clear: both;
    }
    /* Stack the paired fields on mobile */
    .mkto-modal .mkto-side-by-side {
        flex-direction: column;
        gap: 0;
    }
}
