/* =========================================================
   WSS Embroidery – Frontend Styles (uses glozin theme tokens)
   ========================================================= */

/* ── Page wrapper ─────────────────────────────────────────── */
.l-wss-embroidery-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 32px auto;
    padding: 0;
    max-width: 820px;
    color: #444444;
}

/* ── Form card ────────────────────────────────────────────── */
.m-wss-embroidery-order-form {
    color: #444444;
    width: 100%;
}

.m-wss-embroidery-order-form fieldset {
    border: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(33,0,24,0.08);
    overflow: hidden;
}

.m-wss-embroidery-order-form legend {
    display: block;
    width: 100%;
    background: #F9F4F7;
    border-bottom: 1px solid #D3D4E5;
    padding: 16px 28px;
    font-size: 14px;
    color: #888888;
    font-weight: 400;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.6;
}

.m-wss-embroidery-order-form legend strong,
.m-wss-embroidery-order-form legend a {
    color: #210018;
    font-weight: 600;
    text-decoration: none;
}

.m-wss-embroidery-order-form label {
    display: block;
    width: 100%;
}

/* ── Fields wrapper ───────────────────────────────────────── */
.m-wss-embroidery-order-form__fields {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 28px 28px 0;
}

/* ── Login notice ─────────────────────────────────────────── */
p.m-wss-embroidery-form__login-notice {
    background: #F9F4F7;
    border-left: 3px solid #E90A9B;
    padding: 12px 16px;
    border-radius: 5px;
    margin: 0 0 20px;
    font-size: 14px;
    color: #444444;
}

p.m-wss-embroidery-form__login-notice a {
    color: #E90A9B;
    font-weight: 600;
    text-decoration: underline;
}

/* ── Upload area ──────────────────────────────────────────── */
.m-wss-embroidery-order-form__upload-area {
    background: #F9F4F7;
    border: 2px dashed #D3D4E5;
    border-radius: 10px;
    padding: 56px 24px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.m-wss-embroidery-order-form__upload-area:hover {
    border-color: #E90A9B;
    background: #f5edf3;
}

.m-wss-embroidery-order-form__upload-area span {
    display: block;
    color: #888888;
    font-size: 15px;
    margin-bottom: 14px;
}

.m-wss-embroidery-order-form__upload-button {
    background: #210018;
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.m-wss-embroidery-order-form__upload-button:hover {
    background: #E90A9B;
}

/* ── Upload progress ──────────────────────────────────────── */
.m-wss-embroidery-order-form__upload-progress {
    background: #F9F4F7;
    border: 1px solid #D3D4E5;
    border-radius: 10px;
    color: #444444;
    display: block;
    font-size: 1.4rem;
    height: 160px;
    line-height: 160px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* ── Selected logo ────────────────────────────────────────── */
.m-wss-embroidery-order-form__selected-logo {
    display: none;
}

.m-wss-embroidery-order-form__selected-logo-text {
    color: #888888;
    font-size: 14px;
    margin: 0 0 12px;
    text-align: center;
}

.m-wss-embroidery-order-form__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 4px;
}

.m-wss-embroidery-order-form__logo img {
    border: 2px solid #D3D4E5;
    border-radius: 10px;
    display: block;
    max-height: 180px;
    max-width: 280px;
    width: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

/* ── Instructions textarea ────────────────────────────────── */
.m-wss-embroidery-order-form__instructions-fields {
    display: none;
    flex: 1;
    max-width: 100%;
    margin-top: 20px;
}

.m-wss-embroidery-order-form__instructions-fields label {
    font-size: 13px;
    color: #888888;
    line-height: 1.7em !important;
    margin: 0 0 8px;
}

.m-wss-embroidery-order-form__instructions-fields textarea {
    min-height: 100px;
    resize: vertical;
    border: 1px solid #D3D4E5;
    border-radius: 5px;
    padding: 10px 14px;
    width: 100%;
    font-size: 14px;
    color: #444444;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.m-wss-embroidery-order-form__instructions-fields textarea:focus {
    border-color: #E90A9B;
    outline: none;
    box-shadow: 0 0 0 2px rgba(233,10,155,0.1);
}

/* ── Price breakdown ──────────────────────────────────────── */
.m-wss-embroidery-order-form__price-description-container {
    display: none;
    padding: 24px 28px 0;
}

.m-wss-embroidery-order-form__price-description-text {
    font-size: 14px;
    color: #888888;
    margin: 0 0 14px;
    text-align: center;
}

.m-wss-embroidery-order-form__price-description {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #F9F4F7;
    border: 1px solid #D3D4E5;
    border-radius: 10px;
    padding: 20px 16px;
    gap: 10px;
}

/* + and = operators */
.m-wss-embroidery-order-form__price-description::before,
.m-wss-embroidery-order-form__price-description::after {
    content: '+';
    flex: 0 0 auto;
    font-size: 20px;
    color: #888888;
    font-weight: 300;
    order: 2;
    text-align: center;
}
.m-wss-embroidery-order-form__price-description::after {
    content: '=';
    order: 4;
}

.m-wss-embroidery-order-form__price-description-item {
    display: flex;
    flex: 0 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #D3D4E5;
    border-radius: 10px;
    padding: 14px 20px;
    min-width: 120px;
    order: 5;
}

.m-wss-embroidery-order-form__price-description-item span {
    color: #888888;
    font-size: 13px;
    text-align: center;
    order: 2;
    margin-top: 4px;
}

/* Price value (big number) */
.m-wss-embroidery-order-form__price-description-item span:last-child {
    color: #210018;
    font-size: 22px;
    font-weight: 700;
    order: 1;
    margin-top: 0;
}

/* Total column — primary pink */
.m-wss-embroidery-order-form__price-description-item:last-child {
    background: #E90A9B;
    border-color: #E90A9B;
    order: 5;
}

.m-wss-embroidery-order-form__price-description-item:last-child span:last-child {
    color: #ffffff;
    font-size: 24px;
}

.m-wss-embroidery-order-form__setup-fee-description    { order: 1; }
.m-wss-embroidery-order-form__embroidery-price-description { order: 3; }

/* ── Buttons row ──────────────────────────────────────────── */
.m-wss-embroidery-order-form__buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 24px 28px 28px;
    margin-top: 8px;
    border-top: 1px solid #D3D4E5;
}

.m-wss-embroidery-order-form__success-message {
    margin-right: auto;
    font-size: 14px;
    font-weight: 600;
    color: green;
}

/* Shared button style — primary pink */
.m-wss-embroidery-order-form__buttons a.button,
.m-wss-embroidery-order-form__buttons button.button {
    background: #210018;
    color: #ffffff;
    border: 1px solid #210018;
    border-radius: 30px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
    margin-left: 0;
    appearance: none;
    -webkit-appearance: none;
}

.m-wss-embroidery-order-form__buttons a.button:hover,
.m-wss-embroidery-order-form__buttons button.button:hover {
    background: #E90A9B;
    border-color: #E90A9B;
    color: #ffffff;
}

/* Secondary button */
.m-wss-embroidery-order-form__remove-embroidery-button,
.m-wss-embroidery-order-form__remove-logo-button {
    background: #ffffff !important;
    color: #210018 !important;
    border: 1px solid #D3D4E5 !important;
}

.m-wss-embroidery-order-form__remove-embroidery-button:hover,
.m-wss-embroidery-order-form__remove-logo-button:hover {
    background: #F9F4F7 !important;
    border-color: #E90A9B !important;
    color: #E90A9B !important;
}

/* ── Visibility states ────────────────────────────────────── */
.m-wss-embroidery-order-form__add-embroidery-button,
.m-wss-embroidery-order-form__checkout-button,
.m-wss-embroidery-order-form__remove-embroidery-button,
.m-wss-embroidery-order-form__remove-logo-button,
.m-wss-embroidery-order-form__success-message { display: none !important; }

/* uploading */
.m-wss-embroidery-order-form--uploading-logo .m-wss-embroidery-form__login-notice,
.m-wss-embroidery-order-form--uploading-logo .m-wss-embroidery-order-form__selected-logo-text,
.m-wss-embroidery-order-form--uploading-logo .m-wss-embroidery-order-form__upload-area { display: none; }
.m-wss-embroidery-order-form--uploading-logo .m-wss-embroidery-order-form__selected-logo { display: block; }
.m-wss-embroidery-order-form--uploading-logo .m-wss-embroidery-order-form__logo img { display: none; }

/* logo-uploaded */
.m-wss-embroidery-order-form--logo-uploaded .m-wss-embroidery-order-form__instructions-fields,
.m-wss-embroidery-order-form--logo-uploaded .m-wss-embroidery-order-form__price-description-container,
.m-wss-embroidery-order-form--logo-uploaded .m-wss-embroidery-order-form__selected-logo { display: block; }
.m-wss-embroidery-order-form--logo-uploaded .m-wss-embroidery-form__login-notice,
.m-wss-embroidery-order-form--logo-uploaded .m-wss-embroidery-order-form__upload-area,
.m-wss-embroidery-order-form--logo-uploaded .m-wss-embroidery-order-form__upload-progress { display: none; }
.m-wss-embroidery-order-form--logo-uploaded .m-wss-embroidery-order-form__add-embroidery-button,
.m-wss-embroidery-order-form--logo-uploaded .m-wss-embroidery-order-form__remove-logo-button { display: inline-flex !important; align-items: center; }

/* includes-embroidery */
.m-wss-embroidery-order-form--includes-embroidery .m-wss-embroidery-order-form__checkout-button,
.m-wss-embroidery-order-form--includes-embroidery .m-wss-embroidery-order-form__price-description-container,
.m-wss-embroidery-order-form--includes-embroidery .m-wss-embroidery-order-form__remove-embroidery-button,
.m-wss-embroidery-order-form--includes-embroidery .m-wss-embroidery-order-form__selected-logo,
.m-wss-embroidery-order-form--includes-embroidery .m-wss-embroidery-order-form__success-message { display: block !important; }
.m-wss-embroidery-order-form--includes-embroidery .m-wss-embroidery-form__login-notice,
.m-wss-embroidery-order-form--includes-embroidery .m-wss-embroidery-order-form__upload-area,
.m-wss-embroidery-order-form--includes-embroidery .m-wss-embroidery-order-form__upload-progress { display: none; }

/* ── Responsive: tablet+ ──────────────────────────────────── */
@media only screen and (min-width: 600px) {
    .m-wss-embroidery-order-form__price-description {
        flex-direction: row;
        padding: 24px 28px;
    }

    .m-wss-embroidery-order-form__price-description-item {
        min-width: 140px;
    }

    .m-wss-embroidery-order-form__buttons {
        flex-direction: row;
    }
}

/* ── Product page "Add Embroidery" button ─────────────────── */
.m-wss-theme-variation-actions a.button.m-wss-add-embrodery-button,
.m-wss-theme-variation-actions a.button.m-wss-add-embrodery-button:hover {
    background-color: #6262a2;
}

/* ── Embroidery services notice ───────────────────────────── */
.m-wss-embroidery-services-notice.l-wss-embroidery-box {
    max-width: none;
    align-items: stretch;
}

.m-wss-embroidery-services-notice {
    font-size: 15px;
    line-height: 1.6;
    background: linear-gradient(135deg, #fff5fb 0%, #fdfdff 100%);
    border: 1px solid #f4cce3;
    border-left: 4px solid #E90A9B;
    border-radius: 8px;
    padding: 22px 24px;
    margin: 20px 0;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    color: #333;
    box-shadow: 0 2px 6px rgba(233, 10, 155, 0.06);
}

.m-wss-embroidery-services-notice p {
    margin: 0 0 10px;
}

.m-wss-embroidery-services-notice p:last-child {
    margin-bottom: 0;
    color: #555;
    font-size: 14px;
}

.m-wss-embroidery-services-notice__minimum-order-quantity-label {
    color: #E90A9B;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
}

.m-wss-embroidery-services-notice__minimum-order-quantity-label::before {
    content: "✦";
    font-size: 18px;
    line-height: 1;
}

.m-wss-embroidery-services-notice__minimum-order-quantity-value {
    display: inline-block;
    background: #E90A9B;
    color: #fff;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 700;
    margin: 0 2px;
}

@media (max-width: 600px) {
    .m-wss-embroidery-services-notice {
        padding: 16px 14px;
        font-size: 14px;
        border-left-width: 3px;
        border-radius: 6px;
    }
    .m-wss-embroidery-services-notice__minimum-order-quantity-label {
        font-size: 14px;
    }
    .m-wss-embroidery-services-notice p:last-child {
        font-size: 13px;
    }
}
