/* =============================================
   DWI Modal
   ============================================= */

.dwi-modal {
    display: none;
}

.dwi-modal.is-open {
    display: block;
}

.dwi-modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.dwi-modal__container {
    background: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px 32px 32px;
    text-align: center;
}

.dwi-modal__logo-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
}

.dwi-modal__logo {
    display: block;
    max-width: 376px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.dwi-modal__close {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(30px, -30px);
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    color: #99A1AF !important;
    z-index: 10;
    padding: 4px;
}

.dwi-modal__heading {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 0;
    padding-top: 24px;

    strong {
        color: #9B7848;
    }

    p {
        margin-bottom: 0;
    }
}

.dwi-modal__subheading {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0;
    padding-top: 8px;
    color: #9B7848;
}

.dwi-modal__text {
    margin-bottom: 0;
    padding-top: 8px;
}

.dwi-modal__form {
    padding-top: 16px;
}

.dwi-modal__legal {
    font-size: 12px;
    color: #888;
    margin-top: 16px;
    line-height: 1.4;
}

/* =============================================
   Modal Animations
   ============================================= */

@keyframes mmfadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes mmfadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes mmslideIn {
    from { transform: translateY(15%); }
    to   { transform: translateY(0); }
}

@keyframes mmslideOut {
    from { transform: translateY(0); }
    to   { transform: translateY(-10%); }
}

.micromodal-slide[aria-hidden="false"] .dwi-modal__overlay {
    animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="false"] .dwi-modal__container {
    animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1);
}

.micromodal-slide[aria-hidden="true"] .dwi-modal__overlay {
    animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="true"] .dwi-modal__container {
    animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1);
}

/* =============================================
   DWI Form
   ============================================= */

.dwi-modal__form .gfield_required {
    display: none;
}

.dwi-modal__form .gfield_label {
    /* display: none; */
    font-size: 14px;
    font-weight: 500;
    line-height: 16px;
    padding-bottom: 8px;
    color: #1A1A1A;
    width: 100%;
    text-align: left;
}

.dwi-modal__form .gfield input,
.dwi-modal__form .gfield select,
.dwi-modal__form .gfield textarea {
    padding: 16px 24px;
    background: transparent;
    border: 1px solid #ccc;
    color: #1A1A1A !important;
    font-weight: 400;
    width: 100%;
    border-radius: 10px;
    box-sizing: border-box;
    transition: border-color .2s, background .2s;
}

.dwi-modal__form .gfield input::placeholder,
.dwi-modal__form .gfield select::placeholder,
.dwi-modal__form .gfield textarea::placeholder {
    color: rgba(10, 10, 10, 0.5); /* #0A0A0A80 */
}

.dwi-modal__form .gfield input:focus,
.dwi-modal__form .gfield select:focus,
.dwi-modal__form .gfield textarea:focus {
    outline: 2px solid #9B7848;
    border-color: #9B7848;
    background: rgba(155, 120, 72, 0.05);
}

.dwi-modal__form .gfield input:not(:placeholder-shown),
.dwi-modal__form .gfield select:not(:placeholder-shown),
.dwi-modal__form .gfield textarea:not(:placeholder-shown) {
    background: rgba(155, 120, 72, 0.05);
}

.dwi-modal__form .gfield textarea {
    height: 128px;
}

/* Checkbox */
.dwi-modal__form .gfield_checkbox {
    font-size: 14px;
    line-height: 20px;
    border-radius: 24px;
    color: #000;
}

.dwi-modal__form .gfield_checkbox .gchoice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.dwi-modal__form .gfield_checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    min-width: 16px;
    width: 16px !important;
    height: 16px;
    padding: 6px;
    border: 1px solid #000;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.dwi-modal__form .gfield_checkbox input[type="checkbox"]:after {
    content: '';
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #9B7848;
    border-radius: 2px;
}

.dwi-modal__form .gfield_checkbox input[type="checkbox"]:checked:after {
    opacity: 1;
}

/* Grid layout */
.dwi-modal__form .gform_fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Submit button */
.dwi-modal__form .gform_footer {
    padding-top: 24px;
}

.dwi-modal__form .gform_button {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #9B7848;
    color: #fff;
    border: 2px solid #9B7848;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .3s, color .3s, border-color .3s;
}

.dwi-modal__form .gform_button::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('../images/icons/ic-car-white.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.dwi-modal__form .gform_button:hover {
    background: transparent;
    color: #9B7848;
    border-color: #9B7848;
}

/* Validation */
.dwi-modal__form .gform_validation_errors {
    display: none;
}

.dwi-modal__form .validation_message {
    margin-top: 0;
    padding: 2px 12px;
    font-size: 12px;
    background: #C70000;
    color: #fff;
}

.dwi-modal__form .gfield:has(.validation_message) input,
.dwi-modal__form .gfield:has(.validation_message) textarea,
.dwi-modal__form .gfield:has(.validation_message) select {
    border-color: #C70000;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: rgba(199, 0, 0, 0.05);
}
