:root {
    --amtex-orange: #ff6500;
    --amtex-black: #111;
    --amtex-panel: #181818;
    --amtex-line: #3c3c3c;
    --amtex-white: #fff;
    --amtex-muted: #b9b9b9;
}

.amtex-personalization,
.amtex-quote-modal {
    font-family: Montserrat, Arial, sans-serif;
}

.amtex-personalization {
    clear: both;
    margin: 24px 0;
    width: 100%;
}

.amtex-personalization button,
.amtex-personalization input,
.amtex-personalization textarea,
.amtex-quote-modal button,
.amtex-quote-modal input,
.amtex-quote-modal textarea {
    font: inherit;
}

.amtex-personalization-trigger,
.amtex-open-quote,
.amtex-submit-quote {
    align-items: center;
    background: var(--amtex-orange) !important;
    border: 1px solid var(--amtex-orange) !important;
    border-radius: 999px !important;
    color: var(--amtex-black) !important;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    gap: 10px;
    justify-content: center;
    line-height: 1.2;
    min-height: 48px;
    padding: 13px 22px !important;
    text-transform: uppercase;
}

.amtex-personalization-trigger span {
    font-size: 20px;
    line-height: 1;
}

.amtex-personalization-panel {
    background: var(--amtex-black);
    border: 1px solid #333;
    border-radius: 20px;
    color: var(--amtex-white);
    margin-top: 15px;
    overflow: hidden;
    padding: 28px;
}

.amtex-personalization-panel[hidden],
.amtex-text-field[hidden],
.amtex-file-field[hidden],
.amtex-quote-modal[hidden] {
    display: none !important;
}

.amtex-personalization-heading {
    align-items: center;
    border-bottom: 1px solid var(--amtex-line);
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 22px;
}

.amtex-personalization-heading h3,
.amtex-quote-dialog h3 {
    color: var(--amtex-white);
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.1;
    margin: 0 0 7px;
}

.amtex-personalization-heading p,
.amtex-quote-dialog > p {
    color: var(--amtex-muted);
    margin: 0;
}

.amtex-personalization-panel > fieldset {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    clear: both !important;
    float: none !important;
    margin: 0 0 20px !important;
    min-width: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.amtex-personalization-panel > fieldset > legend {
    background: transparent !important;
    border: 0 !important;
    box-sizing: border-box;
    color: var(--amtex-white) !important;
    display: block !important;
    float: none !important;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35 !important;
    margin: 0 0 10px !important;
    max-width: none !important;
    padding: 0 !important;
    position: static !important;
    width: 100% !important;
}

.amtex-field-help {
    color: var(--amtex-muted);
    font-size: 13px;
    margin: -7px 0 13px;
}

.amtex-choice-grid {
    background: transparent !important;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.amtex-choice-grid.is-single {
    grid-template-columns: 1fr;
}

.amtex-choice-grid label {
    cursor: pointer;
    margin: 0;
    position: relative;
}

.amtex-choice-grid input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.amtex-choice-grid label > span {
    background: var(--amtex-panel);
    border: 1px solid var(--amtex-line);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    min-height: 78px;
    padding: 15px 18px;
}

.amtex-choice-grid input:checked + span {
    border-color: var(--amtex-orange);
    box-shadow: inset 0 0 0 1px var(--amtex-orange);
}

.amtex-choice-grid input:focus-visible + span,
.amtex-placement-option:has(input:focus-visible) {
    outline: 2px solid var(--amtex-white);
    outline-offset: 2px;
}

.amtex-choice-grid strong,
.amtex-placement-copy strong {
    color: var(--amtex-white);
    font-size: 14px;
}

.amtex-choice-grid small,
.amtex-placement-copy small {
    color: var(--amtex-muted);
    display: block;
    font-size: 12px;
    margin-top: 4px;
}

.amtex-placement-list {
    background: transparent !important;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.amtex-placement-option {
    align-items: center;
    background: var(--amtex-panel);
    border: 1px solid var(--amtex-line);
    border-radius: 14px;
    cursor: pointer;
    display: grid;
    gap: 12px;
    grid-template-columns: auto 72px 1fr auto;
    margin: 0;
    min-width: 0;
    padding: 11px 14px;
}

.amtex-placement-option:has(input:checked) {
    border-color: var(--amtex-orange);
}

.amtex-placement-option > input {
    accent-color: var(--amtex-orange);
    height: 20px;
    margin: 0;
    width: 20px;
}

.amtex-garment-icon {
    display: block;
    height: 72px;
    position: relative;
    width: 65px;
}

.amtex-garment-icon img {
    display: block;
    height: 72px;
    object-fit: contain;
    width: 65px;
}

.amtex-placement-mark {
    background: var(--amtex-orange);
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.3);
    height: 9px;
    left: 50%;
    position: absolute;
    top: 28%;
    transform: translate(-50%, -50%);
    width: 9px;
}

.amtex-placement-mark.chest-left { left: 42%; top: 36%; }
.amtex-placement-mark.chest-right { left: 58%; top: 36%; }
.amtex-placement-mark.sleeve-left { left: 18%; top: 38%; }
.amtex-placement-mark.sleeve-right { left: 82%; top: 38%; }
.amtex-placement-mark.back-top { height: 7px; top: 34%; width: 22px; }
.amtex-placement-mark.back-bottom { height: 12px; top: 61%; width: 27px; }
.amtex-placement-mark.leg-left-front-bottom,
.amtex-placement-mark.leg-left-back-bottom { height: 13px; left: 36%; top: 78%; width: 9px; }
.amtex-placement-mark.leg-right-front-bottom,
.amtex-placement-mark.leg-right-back-bottom { height: 13px; left: 64%; top: 78%; width: 9px; }
.amtex-placement-mark.leg-left-back-bottom,
.amtex-placement-mark.leg-right-back-bottom { border: 2px solid #fff; }

.amtex-placement-copy {
    min-width: 0;
}

.amtex-placement-size {
    background: #262626;
    border-radius: 999px;
    color: var(--amtex-white);
    font-size: 12px;
    font-weight: 700;
    padding: 7px 10px;
    white-space: nowrap;
}

.amtex-upload {
    align-items: center;
    background: var(--amtex-panel);
    border: 1px dashed #666;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    min-height: 100px;
    padding: 18px;
}

.amtex-upload input {
    max-width: 100%;
    width: auto;
}

.amtex-upload > span {
    display: grid;
    gap: 3px;
    grid-template-columns: minmax(190px, 1fr) auto;
    width: 100%;
}

.amtex-upload strong,
.amtex-upload small,
.amtex-upload em {
    color: var(--amtex-white);
}

.amtex-upload small,
.amtex-upload em {
    color: var(--amtex-muted);
    font-size: 12px;
}

.amtex-file-name {
    font-style: normal;
    grid-column: 1;
}

.amtex-upload input {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.amtex-personalization-panel .amtex-text-field input[type="text"],
.amtex-personalization-panel .amtex-custom-placement-field textarea,
.amtex-quote-modal input,
.amtex-quote-modal textarea {
    background: #202020 !important;
    border: 1px solid #505050 !important;
    border-radius: 12px;
    box-sizing: border-box;
    color: var(--amtex-white) !important;
    min-height: 48px;
    padding: 11px 13px;
    width: 100%;
}

.amtex-custom-placement-field {
    color: var(--amtex-white);
    display: grid;
    font-size: 13px;
    font-weight: 700;
    gap: 8px;
}

.amtex-personalization-panel .amtex-custom-placement-field textarea {
    min-height: 110px;
    resize: vertical;
}

.amtex-personalization-panel .amtex-text-field input[type="text"]::placeholder,
.amtex-personalization-panel .amtex-custom-placement-field textarea::placeholder {
    color: #a9a9a9 !important;
    opacity: 1;
}

.amtex-price-summary {
    background: #202020;
    border: 1px solid #444;
    border-radius: 14px;
    margin-top: 5px;
    padding: 16px 18px;
}

.amtex-price-summary > div {
    align-items: center;
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.amtex-price-summary > div + div {
    border-top: 1px solid #353535;
    margin-top: 10px;
    padding-top: 10px;
}

.amtex-price-summary span,
.amtex-price-summary strong {
    color: var(--amtex-white);
}

.amtex-price-summary strong {
    text-align: right;
}

.amtex-price-summary small {
    color: var(--amtex-muted);
    display: block;
    font-size: 11px;
    margin-top: 12px;
}

.amtex-actions {
    display: flex;
    justify-content: flex-end;
    margin: 13px 0 25px;
}

.amtex-cancel-personalization {
    background: transparent !important;
    border: 0 !important;
    color: var(--amtex-muted) !important;
    cursor: pointer;
    font-size: 12px;
    padding: 5px !important;
    text-decoration: underline;
}

.amtex-project-box {
    align-items: center;
    background: #232323;
    border: 1px solid var(--amtex-orange);
    border-radius: 16px;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 18px;
}

.amtex-project-box p {
    color: var(--amtex-muted);
    margin: 0;
}

.amtex-project-box strong {
    color: var(--amtex-white);
}

.amtex-open-quote {
    flex: 0 0 auto;
    font-size: 12px;
}

.amtex-quote-modal {
    align-items: center;
    background: rgba(0,0,0,.82);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: fixed;
    z-index: 999999;
}

.amtex-quote-dialog {
    background: var(--amtex-black);
    border: 1px solid #444;
    border-radius: 20px;
    color: var(--amtex-white);
    max-height: calc(100vh - 40px);
    max-width: 720px;
    overflow: auto;
    padding: 28px;
    position: relative;
    width: 100%;
}

.amtex-close-quote {
    background: transparent !important;
    border: 0 !important;
    color: var(--amtex-white) !important;
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
    padding: 4px !important;
    position: absolute;
    right: 18px;
    top: 14px;
}

.amtex-quote-dialog form {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.amtex-quote-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.amtex-quote-dialog label {
    color: var(--amtex-white);
    display: grid;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
}

.amtex-quote-dialog textarea {
    min-height: 110px;
    resize: vertical;
}

.amtex-honeypot {
    left: -9999px !important;
    position: absolute !important;
}

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

@media (max-width: 980px) {
    .amtex-placement-list { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .amtex-personalization-panel,
    .amtex-quote-dialog { border-radius: 16px; padding: 19px; }
    .amtex-choice-grid,
    .amtex-quote-grid { grid-template-columns: 1fr; }
    .amtex-placement-option { gap: 9px; grid-template-columns: auto 62px minmax(0, 1fr); padding: 10px; }
    .amtex-garment-icon,
    .amtex-garment-icon img { height: 64px; width: 58px; }
    .amtex-placement-size { grid-column: 3; justify-self: start; }
    .amtex-project-box { align-items: stretch; flex-direction: column; }
    .amtex-open-quote { width: 100%; }
    .amtex-upload > span { grid-template-columns: 1fr; }
    .amtex-upload input { grid-column: 1; grid-row: auto; margin-top: 10px; }
    .amtex-price-summary > div { align-items: flex-start; flex-direction: column; gap: 4px; }
    .amtex-price-summary strong { text-align: left; }
}
