/**
 * File: msi-footer-layout.css
 * Path: /wp-content/themes/msi-theme/assets/css/msi-footer-layout.css
 * Version: 1.0.24-dev
 * Created: 2026-11-28
 * Last Updated: 2026-11-28
 * Author: Lucky Mahrus | https://geraisitus.co.id/
 * Description: Native BeTheme widget footer layout and LM Core form skin based on MSI mockup.
 * Changelog: 1.0.6-dev — Align desktop map with default message field bottom; 1.0.5-dev — Responsive columns, transparent form, footer typography and contact rhythm.
 */

/* Actual staging structure: #Footer > .widgets_wrapper > .container > .column.
 * No widget IDs, page IDs, form changes or contact details are hard-coded. */
body.msi-theme #Footer {
    --msi-footer-bg: var(--msi-red, #b20d17);
    --msi-footer-ink: #fff;
    --msi-footer-font: Arial, Helvetica, sans-serif;
    --msi-footer-heading-size: 20px;
    --msi-footer-text-size: 14px;
    --msi-footer-field-height: 42px;
    --msi-footer-field-border: rgba(255,255,255,.65);
    --msi-footer-field-gap: 18px;
    --msi-footer-message-height: 158px;
    --msi-footer-column-gap: clamp(28px, 6vw, 90px);
    --msi-footer-map-height: 290px;
    background-color: var(--msi-footer-bg) !important;
    color: var(--msi-footer-ink) !important;
}
body.msi-theme #Footer .widgets_wrapper {
    padding: 64px 0 88px !important;
    color: var(--msi-footer-ink);
    font-family: var(--msi-footer-font);
    font-size: var(--msi-footer-text-size);
    font-weight: 400;
    line-height: 1.5;
}
/* Use grid only on the actual three-column widget layout, preserving other footer variants. */
body.msi-theme #Footer .widgets_wrapper > .container:has(> .column.one-third) {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: var(--msi-footer-column-gap);
    box-sizing: border-box;
    width: calc(100% - 64px) !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}
body.msi-theme #Footer .widgets_wrapper > .container:has(> .column.one-third)::before,
body.msi-theme #Footer .widgets_wrapper > .container:has(> .column.one-third)::after {
    display: none !important;
    content: none !important;
}
body.msi-theme #Footer .widgets_wrapper > .container:has(> .column.one-third) > .column {
    float: none !important;
    width: auto !important;
    min-width: 0;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}
body.msi-theme #Footer .widgets_wrapper > .container > .column > .mcb-column-inner {
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0;
}
body.msi-theme #Footer .widgets_wrapper .widget {
    padding: 0 !important;
    margin: 0 0 14px !important;
    color: var(--msi-footer-ink);
    min-width: 0;
}
body.msi-theme #Footer .widgets_wrapper .widget:last-child { margin-bottom: 0 !important; }
body.msi-theme #Footer .widgets_wrapper .widget::after { display: none; }
body.msi-theme #Footer .widgets_wrapper :is(h1,h2,h3,h4,h5,h6,.wp-block-heading,.widgettitle,.widget-title) {
    color: var(--msi-footer-ink) !important;
    font-family: var(--msi-footer-font) !important;
    font-style: normal !important;
    font-size: var(--msi-footer-heading-size) !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left;
}
body.msi-theme #Footer .widgets_wrapper :is(h1,h2,h3,h4,h5,h6,.wp-block-heading,.widgettitle,.widget-title) strong {
    font: inherit !important;
    color: inherit !important;
}
body.msi-theme #Footer .widgets_wrapper .widget p {
    font-family: var(--msi-footer-font) !important;
    font-size: var(--msi-footer-text-size) !important;
    font-weight: 400;
    line-height: 1.5 !important;
    color: var(--msi-footer-ink) !important;
    margin: 0 0 12px !important;
    padding: 0;
    overflow-wrap: anywhere;
}
body.msi-theme #Footer .widgets_wrapper .widget p.lead {
    font-weight: 700 !important;
    margin: 8px 0 16px !important;
}
body.msi-theme #Footer .widgets_wrapper .widget p:last-child,
body.msi-theme #Footer .widgets_wrapper .widget p:empty,
body.msi-theme #Footer .widgets_wrapper .widget p:has(+ .lm-contact-form) { margin-bottom: 0 !important; }
body.msi-theme #Footer .widgets_wrapper .widget a { color: var(--msi-footer-ink) !important; }
body.msi-theme #Footer .widgets_wrapper .widget a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Native map: preserve existing URL, location and iframe attributes. */
body.msi-theme #Footer .widgets_wrapper .widget iframe {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: var(--msi-footer-map-height) !important;
    border: 0;
    margin: 0 !important;
}
/* LM Core form: leave actual inputs, honeypot, validation and AJAX intact. */
body.msi-theme #Footer .widgets_wrapper .lm-contact-form {
    display: block !important;
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
body.msi-theme #Footer .widgets_wrapper .lm-contact-form .lm-contact-form__fields {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: var(--msi-footer-field-gap) 14px !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    align-items: start;
}
body.msi-theme #Footer .widgets_wrapper .lm-contact-form .lm-contact-form__field {
    display: block !important;
    grid-column: 1 / -1;
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* Match real field names as well as class names, independent of label order. */
body.msi-theme #Footer .widgets_wrapper .lm-contact-form .lm-contact-form__field:has(> input[name="lmcf_name"]),
body.msi-theme #Footer .widgets_wrapper .lm-contact-form .lm-contact-form__field--email,
body.msi-theme #Footer .widgets_wrapper .lm-contact-form .lm-contact-form__field:has(> input[name="lmcf_email"]) { grid-column: auto; }
body.msi-theme #Footer .widgets_wrapper .lm-contact-form .lm-contact-form__fields :is(input:not([type="hidden"]),textarea) {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: var(--msi-footer-field-height);
    height: var(--msi-footer-field-height);
    margin: 0 !important;
    padding: 10px 12px !important;
    border: 1px solid var(--msi-footer-field-border) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--msi-footer-ink) !important;
    font: 400 var(--msi-footer-text-size)/1.4 var(--msi-footer-font) !important;
    box-shadow: none !important;
    caret-color: #fff;
}
body.msi-theme #Footer .widgets_wrapper .lm-contact-form .lm-contact-form__fields textarea {
    height: var(--msi-footer-message-height) !important;
    min-height: var(--msi-footer-message-height) !important;
    resize: vertical;
}
body.msi-theme #Footer .widgets_wrapper .lm-contact-form .lm-contact-form__fields :is(input,textarea)::placeholder {
    color: #fff !important;
    opacity: 1 !important;
}
body.msi-theme #Footer .widgets_wrapper .lm-contact-form .lm-contact-form__fields :is(input,textarea):focus {
    border-color: #fff !important;
    outline: 2px solid #fff !important;
    outline-offset: 2px;
    background-color: rgba(255,255,255,.07) !important;
}
body.msi-theme #Footer .widgets_wrapper .lm-contact-form .lm-contact-form__fields input:autofill {
    -webkit-text-fill-color: #1a252b;
}
body.msi-theme #Footer .widgets_wrapper .lm-contact-form .lm-contact-form__trap { display: none !important; }
body.msi-theme #Footer .widgets_wrapper .lm-contact-form .lm-contact-form__actions {
    display: flex !important;
    justify-content: flex-start !important;
    margin: 20px 0 0 !important;
    padding: 0 !important;
}
body.msi-theme #Footer .widgets_wrapper .lm-contact-form button.lm-contact-form__submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: auto !important;
    max-width: 100%;
    min-height: 46px;
    margin: 0 !important;
    padding: 12px 25px !important;
    border: 1px solid #fff !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: var(--msi-green-dark, #08462a) !important;
    font: 700 13px/1.35 var(--msi-footer-font) !important;
    text-transform: uppercase;
    letter-spacing: 0;
    box-shadow: none !important;
    cursor: pointer;
}
body.msi-theme #Footer .widgets_wrapper .lm-contact-form button.lm-contact-form__submit::before,
body.msi-theme #Footer .widgets_wrapper .lm-contact-form button.lm-contact-form__submit::after { display: none !important; }
body.msi-theme #Footer .widgets_wrapper .lm-contact-form button.lm-contact-form__submit:is(:hover,:focus-visible) {
    background: var(--msi-green-dark, #08462a) !important;
    color: #fff !important;
}
body.msi-theme #Footer .widgets_wrapper .lm-contact-form button.lm-contact-form__submit:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}
body.msi-theme #Footer .widgets_wrapper .lm-contact-form button.lm-contact-form__submit:disabled { opacity: .65; cursor: wait; }
body.msi-theme #Footer .widgets_wrapper .lm-contact-form .lm-contact-form__notice {
    color: #fff !important;
    font: 400 var(--msi-footer-text-size)/1.5 var(--msi-footer-font);
    margin: 12px 0 0;
    overflow-wrap: anywhere;
}
body.msi-theme #Footer .widgets_wrapper .lm-contact-form .lm-contact-form__notice:empty { margin: 0; }
/* Align legacy email SVG and native encoded contact links, retain obfuscation. */
body.msi-theme #Footer .widgets_wrapper a.msi-footer-email.lmcore-encoded-email-link,
body.msi-theme #Footer .widgets_wrapper a.msi-footer-contact.lmcore-encoded-contact-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 14px !important;
    font: 400 var(--msi-footer-text-size)/1.5 var(--msi-footer-font) !important;
    color: #fff !important;
    min-width: 0;
    max-width: 100%;
    margin: 0 !important;
    text-decoration: none !important;
    overflow-wrap: anywhere;
}
body.msi-theme #Footer .widgets_wrapper a.msi-footer-email.lmcore-encoded-email-link::before {
    width: 24px;
    height: 20px;
    flex: 0 0 24px;
}
body.msi-theme #Footer .widgets_wrapper a.msi-footer-contact.lmcore-encoded-contact-link .lmcore-encoded-contact__icon {
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 24px !important;
}
/* Desktop: two input rows, two gaps and the message field. Keep smaller layouts unchanged. */
@media (min-width: 960px) {
    body.msi-theme #Footer {
        --msi-footer-map-height: calc(
            (var(--msi-footer-field-height) * 2) +
            (var(--msi-footer-field-gap) * 2) +
            var(--msi-footer-message-height)
        );
    }
}
@media (max-width: 959px) {
    body.msi-theme #Footer .widgets_wrapper { padding: 48px 0 60px !important; }
    body.msi-theme #Footer .widgets_wrapper > .container:has(> .column.one-third) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 36px;
    }
}
@media (max-width: 767px) {
    body.msi-theme #Footer { --msi-footer-heading-size: 19px; --msi-footer-map-height: 260px; }
    body.msi-theme #Footer .widgets_wrapper { padding: 40px 0 48px !important; }
    body.msi-theme #Footer .widgets_wrapper > .container:has(> .column.one-third) {
        grid-template-columns: minmax(0, 1fr);
        width: calc(100% - 40px) !important;
        gap: 36px;
    }
}
@media (max-width: 359px) {
    body.msi-theme #Footer .widgets_wrapper .lm-contact-form .lm-contact-form__fields { grid-template-columns: minmax(0, 1fr) !important; }
}
