/* =========================================================
   PRINTED TODAY — MODERN FOAMEX/PVC BOARD FINISHING
   Loaded only for the permitted preview user.
   ========================================================= */

.pt-mf,
.pt-mf * {
    box-sizing: border-box;
}

.pt-mf {
    width: 100%;
    margin: 16px 0 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #111;
}

.pt-mf button,
.pt-mf textarea,
.pt-mf select {
    font-family: inherit;
}

.pt-mf__bar {
    display: flex;
    align-items: baseline;
    gap: 10px;
    width: 100%;
    min-height: 59px;
    margin: 0;
    padding: 11px 20px;
    background: #dc1f2d;
    color: #fff;
}

.pt-mf__bar strong {
    font-size: 29px;
    font-weight: 500;
    line-height: 36px;
}

.pt-mf__bar span {
    font-size: 19px;
    font-weight: 400;
    line-height: 30px;
}

.pt-mf__layout {
    display: grid;
    grid-template-columns: minmax(0, 62%) minmax(360px, 38%);
    gap: 42px;
    width: 100%;
    padding: 17px 0 20px;
}

.pt-mf__eyelets,
.pt-mf__right {
    min-width: 0;
}

.pt-mf__section-heading,
.pt-mf__print-heading {
    display: flex;
    align-items: baseline;
    gap: 13px;
    width: 100%;
    margin: 0 0 11px;
}

.pt-mf__section-heading h3,
.pt-mf__print-heading h3 {
    flex: 0 0 auto;
    margin: 0;
    color: #111;
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
}

.pt-mf__section-heading p,
.pt-mf__print-heading p {
    margin: 0;
    color: #111;
    font-size: 12px;
    font-weight: 400;
    line-height: 17px;
}

.pt-mf__section-heading--drill p {
    color: #ed1c24;
}

.pt-mf__eyelet-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    width: 100%;
}

.pt-mf__drill-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    width: 100%;
}

.pt-mf__card,
.pt-mf__dpi {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-width: 0;
    margin: 0;
    border: 2px solid transparent;
    border-radius: 7px;
    outline: 0;
    background: #d7d7d7;
    box-shadow: none;
    color: #111;
    cursor: pointer;
    transition:
        border-color .12s ease,
        background-color .12s ease;
}

.pt-mf__card {
    min-height: 150px;
    padding: 7px 7px 8px;
}

.pt-mf__card:hover,
.pt-mf__card:focus-visible,
.pt-mf__dpi:hover,
.pt-mf__dpi:focus-visible {
    border-color: #ef4d55;
}

.pt-mf__card--selected,
.pt-mf__card[aria-pressed="true"],
.pt-mf__dpi--selected,
.pt-mf__dpi[aria-pressed="true"] {
    border-color: #ed1c24;
    background: #fff;
}

.pt-mf__image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 88px;
    margin: 0 0 3px;
    padding: 7px;
    border-radius: 4px;
    background: #c5c5c5;
}

.pt-mf__image img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: contain;
}

.pt-mf__card > strong {
    display: block;
    width: 100%;
    margin: 0;
    color: #111;
    font-size: 12px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}

.pt-mf__card > small {
    display: block;
    width: 100%;
    margin: 1px 0 0;
    color: #111;
    font-size: 10px;
    font-weight: 400;
    line-height: 12px;
    text-align: center;
}

.pt-mf__diagram {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    background: #fff;
    box-shadow: 0 2px 2px rgba(0, 0, 0, .35);
}

.pt-mf__diagram i {
    position: absolute;
    top: 7px;
    width: 7px;
    height: 7px;
    border: 2px solid #b4b4b4;
    border-radius: 50%;
    background: #fff;
}

.pt-mf__diagram i:nth-child(1) { left: 7px; }
.pt-mf__diagram i:nth-child(2) { left: 20%; transform: translateX(-50%); }
.pt-mf__diagram i:nth-child(3) { left: 34%; transform: translateX(-50%); }
.pt-mf__diagram i:nth-child(4) { left: 48%; transform: translateX(-50%); }
.pt-mf__diagram i:nth-child(5) { left: 62%; transform: translateX(-50%); }
.pt-mf__diagram i:nth-child(6) { left: 76%; transform: translateX(-50%); }
.pt-mf__diagram i:nth-child(7) { left: 90%; transform: translateX(-50%); }
.pt-mf__diagram i:nth-child(8) { right: 7px; }

.pt-mf__custom-row {
    display: grid;
    grid-template-columns: 133px minmax(0, 1fr);
    gap: 13px;
    width: 100%;
    margin-top: 16px;
}

.pt-mf__custom-card {
    width: 133px;
    min-height: 150px;
}

.pt-mf__instructions {
    display: block;
    width: 100%;
    min-height: 150px;
    margin: 0;
    padding: 10px;
    resize: vertical;
    border: 1px solid #777;
    border-radius: 6px;
    outline: 0;
    background: #fff;
    color: #333;
    font-size: 13px;
    line-height: 18px;
}

.pt-mf__instructions:focus {
    border-color: #dc1f2d;
    box-shadow: 0 0 0 1px #dc1f2d;
}

.pt-mf__print-heading {
    margin-top: 12px;
}

.pt-mf__print-grid {
    display: grid;
    grid-template-columns: repeat(2, 133px);
    gap: 9px;
    width: 100%;
}

.pt-mf__dpi {
    width: 133px;
    min-height: 122px;
    padding: 6px;
}

.pt-mf__dpi-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 82px;
    margin: 0;
    border-radius: 4px;
    background: #bdbdbd;
}

.pt-mf__dpi-image strong {
    display: block;
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    line-height: 27px;
    text-shadow:
        -2px -2px 0 #000,
         2px -2px 0 #000,
        -2px  2px 0 #000,
         2px  2px 0 #000;
}

.pt-mf__dpi-image small {
    display: block;
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 16px;
    text-shadow:
        -1px -1px 0 #000,
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
}

.pt-mf__dpi b {
    display: block;
    margin: 7px 0 0;
    color: #111;
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.pt-mf__hidden-control {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/*
 * The parent template already outputs #rt_finishing.
 * Keep that real calculator control available but visually hidden.
 */
body .pt-mf ~ #rt_finishing,
body #rt_finishing {
    /* Existing template normally hides this control already. */
}

@media screen and (max-width: 1100px) {
    .pt-mf__layout {
        grid-template-columns: minmax(0, 60%) minmax(330px, 40%);
        gap: 24px;
    }

    .pt-mf__eyelet-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 767px) {
    .pt-mf__bar {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
    }

    .pt-mf__bar strong {
        font-size: 25px;
    }

    .pt-mf__bar span {
        font-size: 16px;
    }

    .pt-mf__layout {
        display: block;
        padding: 15px 0;
    }

    .pt-mf__right {
        margin-top: 24px;
    }

    .pt-mf__eyelet-grid,
    .pt-mf__drill-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pt-mf__custom-row {
        grid-template-columns: 1fr;
    }

    .pt-mf__custom-card,
    .pt-mf__dpi {
        width: 100%;
    }

    .pt-mf__print-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 420px) {
    .pt-mf__eyelet-grid,
    .pt-mf__drill-grid,
    .pt-mf__print-grid {
        grid-template-columns: 1fr;
    }
}
