/* ═══════════════════════════════════════════════════════════════
   Nextlevel SiteFeedback Modal
   Styled to match MVP's hero-fitment glassmorphic pattern.
   Uses MVP design tokens (--mvp-red, etc.) already defined globally.

   All rules below prefixed with #nlh-sitefeedback-modal for ID-based
   specificity so they override Magento/SM theme button and form rules
   without needing !important. Magento's form-control rules typically
   have specificity (0,2,1); our (1,2,0) wins.
   ═══════════════════════════════════════════════════════════════ */

/* ─── ROOT ─── */
#nlh-sitefeedback-modal {
    font-family: var(--mvp-font-body, 'Barlow', sans-serif);
    color: var(--mvp-white, #ffffff);
    line-height: 1.6;
}

#nlh-sitefeedback-modal .nlh-sitefeedback__wrap {
    position: relative;
    background: var(--mvp-dk-charcoal, #141414);
    padding: clamp(32px, 4vw, 56px);
    color: var(--mvp-white, #ffffff);
    border-radius: 0;
    overflow: hidden;
}

/* Red accent top bar */
#nlh-sitefeedback-modal .nlh-sitefeedback__wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: var(--mvp-red, #e63946);
}

/* ─── CLOSE BUTTON (override Magento primary button defaults) ─── */
#nlh-sitefeedback-modal button.nlh-sitefeedback__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    min-height: 0;
    background: transparent;
    background-color: transparent;
    background-image: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    color: var(--mvp-white, #ffffff);
    box-shadow: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.3s;
    z-index: 2;
}
#nlh-sitefeedback-modal button.nlh-sitefeedback__close:hover,
#nlh-sitefeedback-modal button.nlh-sitefeedback__close:focus {
    background: rgba(230, 57, 70, 0.08);
    background-color: rgba(230, 57, 70, 0.08);
    border-color: var(--mvp-red, #e63946);
    transform: rotate(90deg);
    outline: none;
}

/* Hide the inline SVG completely. Some themes strip stroke attributes
   or inject styles that make it invisible. We draw the X below with
   pure CSS pseudo-elements for maximum reliability. */
#nlh-sitefeedback-modal button.nlh-sitefeedback__close svg {
    display: none;
}

/* Draw the X with two rotated bars via ::before and ::after.
   Both are position:absolute so they're taken out of the button's
   flex flow and centered via top/left/margin. */
#nlh-sitefeedback-modal button.nlh-sitefeedback__close::before,
#nlh-sitefeedback-modal button.nlh-sitefeedback__close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    margin-top: -1px;
    margin-left: -8px;
    background: #ffffff;
    background-color: #ffffff;
    border-radius: 1px;
    transition: background-color 0.3s;
}
#nlh-sitefeedback-modal button.nlh-sitefeedback__close::before {
    transform: rotate(45deg);
}
#nlh-sitefeedback-modal button.nlh-sitefeedback__close::after {
    transform: rotate(-45deg);
}
#nlh-sitefeedback-modal button.nlh-sitefeedback__close:hover::before,
#nlh-sitefeedback-modal button.nlh-sitefeedback__close:hover::after,
#nlh-sitefeedback-modal button.nlh-sitefeedback__close:focus::before,
#nlh-sitefeedback-modal button.nlh-sitefeedback__close:focus::after {
    background: var(--mvp-red, #e63946);
    background-color: var(--mvp-red, #e63946);
}

/* ─── HEADER ─── */
#nlh-sitefeedback-modal .nlh-sitefeedback__head {
    margin-bottom: 28px;
    padding-right: 60px;
}
#nlh-sitefeedback-modal .nlh-sitefeedback__eyebrow {
    font-family: var(--mvp-font-condensed, 'Barlow Condensed', sans-serif);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--mvp-red, #e63946);
    display: block;
    margin-bottom: 12px;
}
#nlh-sitefeedback-modal .nlh-sitefeedback__title {
    font-family: var(--mvp-font-display, 'Bebas Neue', sans-serif);
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1;
    text-transform: uppercase;
    color: var(--mvp-white, #ffffff);
    margin: 0 0 14px 0;
    letter-spacing: -0.2px;
}
#nlh-sitefeedback-modal .nlh-sitefeedback__desc {
    font-family: var(--mvp-font-body, 'Barlow', sans-serif);
    font-weight: 300;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.55);
    max-width: 52ch;
    margin: 0;
}

/* ─── MODE TOGGLE PILLS (beat Magento primary button red) ─── */
#nlh-sitefeedback-modal .nlh-sitefeedback__mode {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    padding: 3px;
    margin-bottom: 28px;
}
#nlh-sitefeedback-modal button.nlh-sitefeedback__mode-btn {
    font-family: var(--mvp-font-condensed, 'Barlow Condensed', sans-serif);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 9px 20px;
    background: transparent;
    background-color: transparent;
    background-image: none;
    border: none;
    border-radius: 100px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    box-shadow: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-height: 0;
    margin: 0;
    transition: all 0.25s;
}
#nlh-sitefeedback-modal button.nlh-sitefeedback__mode-btn:hover {
    background: transparent;
    color: var(--mvp-white, #ffffff);
    outline: none;
}
#nlh-sitefeedback-modal button.nlh-sitefeedback__mode-btn.is-active {
    background: var(--mvp-red, #e63946);
    background-color: var(--mvp-red, #e63946);
    color: var(--mvp-white, #ffffff);
}

/* ─── FORM LAYOUT ─── */
#nlh-sitefeedback-modal .nlh-sitefeedback__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0;
}

#nlh-sitefeedback-modal .nlh-sitefeedback__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
#nlh-sitefeedback-modal .nlh-sitefeedback__field {
    display: flex;
    flex-direction: column;
    margin: 0;
}
#nlh-sitefeedback-modal .nlh-sitefeedback__mode-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Honeypot: visually hidden but still in DOM */
#nlh-sitefeedback-modal .nlh-sitefeedback__honeypot {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ─── LABELS ─── */
#nlh-sitefeedback-modal .nlh-sitefeedback__label {
    font-family: var(--mvp-font-condensed, 'Barlow Condensed', sans-serif);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 8px;
    display: block;
}
#nlh-sitefeedback-modal .nlh-sitefeedback__label .nlh-sitefeedback__optional {
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
    font-size: 9px;
    margin-left: 4px;
    text-transform: none;
}

/* ─── FORM CONTROLS (beat Magento's white-background default) ─── */
#nlh-sitefeedback-modal input.nlh-sitefeedback__input,
#nlh-sitefeedback-modal select.nlh-sitefeedback__select,
#nlh-sitefeedback-modal textarea.nlh-sitefeedback__textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
    background-color: rgba(255, 255, 255, 0.06);
    background-image: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--mvp-white, #ffffff);
    font-family: var(--mvp-font-body, 'Barlow', sans-serif);
    font-size: 14px;
    line-height: 1.4;
    font-weight: normal;
    letter-spacing: normal;
    height: auto;
    min-height: 44px;
    box-shadow: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: background 0.25s, border-color 0.25s;
    box-sizing: border-box;
    margin: 0;
}
#nlh-sitefeedback-modal textarea.nlh-sitefeedback__textarea {
    resize: vertical;
    min-height: 96px;
    line-height: 1.5;
}

/* Dropdown chevron on select (keep the custom SVG arrow) */
#nlh-sitefeedback-modal select.nlh-sitefeedback__select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23999999' stroke-width='1.2' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

/* Dropdown options menu (the native menu when the select is open) */
#nlh-sitefeedback-modal select.nlh-sitefeedback__select option {
    background: #141414;
    background-color: #141414;
    color: var(--mvp-white, #ffffff);
    padding: 8px 12px;
}

/* Placeholder color */
#nlh-sitefeedback-modal input.nlh-sitefeedback__input::placeholder,
#nlh-sitefeedback-modal textarea.nlh-sitefeedback__textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
    opacity: 1;
}
#nlh-sitefeedback-modal input.nlh-sitefeedback__input::-webkit-input-placeholder,
#nlh-sitefeedback-modal textarea.nlh-sitefeedback__textarea::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.3);
}
#nlh-sitefeedback-modal input.nlh-sitefeedback__input::-moz-placeholder,
#nlh-sitefeedback-modal textarea.nlh-sitefeedback__textarea::-moz-placeholder {
    color: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

/* Focus state */
#nlh-sitefeedback-modal input.nlh-sitefeedback__input:focus,
#nlh-sitefeedback-modal select.nlh-sitefeedback__select:focus,
#nlh-sitefeedback-modal textarea.nlh-sitefeedback__textarea:focus {
    outline: none;
    border-color: rgba(230, 57, 70, 0.6);
    background: rgba(255, 255, 255, 0.08);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

/* Autofill (Chrome/Safari dumps white background + black text unless we override) */
#nlh-sitefeedback-modal input.nlh-sitefeedback__input:-webkit-autofill,
#nlh-sitefeedback-modal input.nlh-sitefeedback__input:-webkit-autofill:hover,
#nlh-sitefeedback-modal input.nlh-sitefeedback__input:-webkit-autofill:focus,
#nlh-sitefeedback-modal input.nlh-sitefeedback__input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--mvp-white, #ffffff);
    -webkit-box-shadow: 0 0 0 1000px rgba(25, 25, 25, 1) inset;
    caret-color: var(--mvp-white, #ffffff);
    transition: background-color 5000s ease-in-out 0s;
}

/* ─── SUBMIT ROW ─── */
#nlh-sitefeedback-modal .nlh-sitefeedback__submit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
#nlh-sitefeedback-modal .nlh-sitefeedback__submit-note {
    font-family: var(--mvp-font-condensed, 'Barlow Condensed', sans-serif);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

#nlh-sitefeedback-modal button.nlh-sitefeedback__submit {
    background: var(--mvp-red, #e63946);
    background-color: var(--mvp-red, #e63946);
    background-image: none;
    color: var(--mvp-white, #ffffff);
    border: none;
    border-radius: 6px;
    padding: 14px 28px;
    font-family: var(--mvp-font-condensed, 'Barlow Condensed', sans-serif);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 0;
    margin: 0;
    box-shadow: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.3s;
}
#nlh-sitefeedback-modal button.nlh-sitefeedback__submit:hover,
#nlh-sitefeedback-modal button.nlh-sitefeedback__submit:focus {
    background: var(--mvp-red-dark, #c4303c);
    background-color: var(--mvp-red-dark, #c4303c);
    color: var(--mvp-white, #ffffff);
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.15);
    transform: translateY(-1px);
    outline: none;
}
#nlh-sitefeedback-modal button.nlh-sitefeedback__submit:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}
#nlh-sitefeedback-modal button.nlh-sitefeedback__submit svg {
    width: 14px;
    height: 10px;
    stroke: currentColor;
    fill: none;
}

/* ─── INLINE FEEDBACK MESSAGE ─── */
#nlh-sitefeedback-modal .nlh-sitefeedback__feedback {
    font-family: var(--mvp-font-body, 'Barlow', sans-serif);
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 4px;
    background: rgba(230, 57, 70, 0.1);
    border-left: 2px solid var(--mvp-red, #e63946);
    color: var(--mvp-white, #ffffff);
}
#nlh-sitefeedback-modal .nlh-sitefeedback__feedback.is-success {
    background: rgba(46, 125, 50, 0.1);
    border-left-color: #2e7d32;
}
#nlh-sitefeedback-modal .nlh-sitefeedback__feedback.is-error {
    background: rgba(230, 57, 70, 0.1);
    border-left-color: var(--mvp-red, #e63946);
}

/* ─── SUCCESS STATE ─── */
#nlh-sitefeedback-modal .nlh-sitefeedback__success {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 32px;
    background: rgba(230, 57, 70, 0.08);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 8px;
    margin-top: 8px;
}
#nlh-sitefeedback-modal .nlh-sitefeedback__success-icon {
    width: 40px;
    height: 40px;
    border: 2px solid var(--mvp-red, #e63946);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
#nlh-sitefeedback-modal .nlh-sitefeedback__success-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--mvp-red, #e63946);
    fill: none;
}
#nlh-sitefeedback-modal .nlh-sitefeedback__success-title {
    font-family: var(--mvp-font-display, 'Bebas Neue', sans-serif);
    font-size: 32px;
    color: var(--mvp-white, #ffffff);
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 8px;
}
#nlh-sitefeedback-modal .nlh-sitefeedback__success-body {
    font-family: var(--mvp-font-body, 'Barlow', sans-serif);
    font-weight: 300;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    max-width: 46ch;
    margin: 0;
}

/* ─── MAGENTO MODAL CHROME OVERRIDES ─── */
.modal-popup.nlh-sitefeedback-modal-popup .modal-inner-wrap {
    background: transparent;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    max-width: 640px;
}
.modal-popup.nlh-sitefeedback-modal-popup .modal-header,
.modal-popup.nlh-sitefeedback-modal-popup .modal-footer {
    display: none;
}
.modal-popup.nlh-sitefeedback-modal-popup .modal-content {
    padding: 0;
    background: transparent;
}

/* ─── MOBILE ─── */
@media (max-width: 640px) {
    #nlh-sitefeedback-modal .nlh-sitefeedback__row {
        grid-template-columns: 1fr;
    }
    #nlh-sitefeedback-modal .nlh-sitefeedback__submit-row {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    #nlh-sitefeedback-modal button.nlh-sitefeedback__submit {
        justify-content: center;
    }
    #nlh-sitefeedback-modal .nlh-sitefeedback__head {
        padding-right: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #nlh-sitefeedback-modal,
    #nlh-sitefeedback-modal *,
    #nlh-sitefeedback-modal *::before,
    #nlh-sitefeedback-modal *::after {
        transition: none !important;
        animation: none !important;
    }
}