/* ── Quantity Tier Pills ─────────────────────────────── */
.tpl-tier-section {
    margin-bottom: 18px;
}
.tpl-tier-hint {
    font-size: 11px;
    color: #999;
    font-weight: 400;
    margin-left: 6px;
}
.tpl-tier-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.tpl-tier-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    border: 2px solid #e2e0db;
    border-radius: 8px;
    background: #faf9f7;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    min-width: 72px;
    line-height: 1.2;
}
.tpl-tier-pill:hover {
    border-color: #c5a8e0;
    background: #f7f3fd;
}
.tpl-tier-pill.tpl-tier-active {
    border-color: #8b3fc8;
    background: #f3eafc;
    box-shadow: 0 0 0 3px rgba(139,63,200,0.12);
}
.tpl-tier-qty {
    font-weight: 700;
    font-size: 13px;
    color: #2c2c2c;
}
.tpl-tier-discount {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: #27ae60;
    border-radius: 4px;
    padding: 1px 5px;
}
.tpl-tier-price {
    font-size: 12px;
    color: #555;
}
.tpl-tier-active .tpl-tier-qty {
    color: #5a1fa0;
}
.tpl-tier-active .tpl-tier-price {
    color: #6c2db0;
    font-weight: 600;
}

/* ── Summary discount badge ──────────────────────────── */
.tpl-sum-discount-badge {
    display: inline-block;
    margin: 4px 0 8px;
    background: #e8f8ef;
    color: #1a7a45;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #b2e4c9;
}



/* ── Quantity Tier Pills ─────────────────────────────── */
.tpl-tier-section {
    margin-bottom: 18px;
}
.tpl-tier-hint {
    font-size: 11px;
    color: #999;
    font-weight: 400;
    margin-left: 6px;
}
.tpl-tier-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.tpl-tier-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    border: 2px solid #e2e0db;
    border-radius: 8px;
    background: #faf9f7;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    min-width: 72px;
    line-height: 1.2;
}
.tpl-tier-pill:hover {
    border-color: #c5a8e0;
    background: #f7f3fd;
}
.tpl-tier-pill.tpl-tier-active {
    border-color: #8b3fc8;
    background: #f3eafc;
    box-shadow: 0 0 0 3px rgba(139,63,200,0.12);
}
.tpl-tier-qty {
    font-weight: 700;
    font-size: 13px;
    color: #2c2c2c;
}
.tpl-tier-discount {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: #27ae60;
    border-radius: 4px;
    padding: 1px 5px;
}
.tpl-tier-price {
    font-size: 12px;
    color: #555;
}
.tpl-tier-active .tpl-tier-qty {
    color: #5a1fa0;
}
.tpl-tier-active .tpl-tier-price {
    color: #6c2db0;
    font-weight: 600;
}

/* ── Summary discount badge ──────────────────────────── */
.tpl-sum-discount-badge {
    display: inline-block;
    margin: 4px 0 8px;
    background: #e8f8ef;
    color: #1a7a45;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #b2e4c9;
}

/* ── Qty indicator row (replaces tier pills) ─────────── */
.tpl-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.tpl-qty-indicator {
    font-size: 12px;
    color: #777;
    background: #f4f3f0;
    border-radius: 4px;
    padding: 3px 9px;
    transition: background 0.2s, color 0.2s;
}
.tpl-qty-indicator--active {
    background: #eef7f1;
    color: #1a7a45;
    font-weight: 600;
}


/* Textile Print Locations — Frontend CSS v1.2.0 */

.tpl-root {
    margin: 20px 0 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #222;
}

/* ── Section label ────────────────────────────────── */
.tpl-label {
    font-size: 12px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 10px;
}

/* ── Location grid ────────────────────────────────── */
.tpl-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .tpl-grid { grid-template-columns: repeat(2, 1fr); }
}

.tpl-loc-card {
    position: relative;
    border: 1.5px solid #e2e0db;
    border-radius: 10px;
    background: #fff;
    padding: 12px 8px 10px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.tpl-loc-card:hover {
    border-color: #f4a8d8;
    background: #fdf5fb;
    box-shadow: 0 2px 8px rgba(233,30,140,0.08);
}

.tpl-loc-card.tpl-selected {
    border-color: #e91e8c;
    background: #fce4f4;
    box-shadow: 0 2px 10px rgba(233,30,140,0.13);
}

/* Badge */
.tpl-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    background: #e91e8c;
    color: #fff;
    border-radius: 20px;
    min-width: 22px;
    height: 22px;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    letter-spacing: 0;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* Card image */
.tpl-loc-thumb { margin-bottom: 6px; }

.tpl-loc-img,
.tpl-tshirt-svg {
    width: 58px;
    height: 58px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.tpl-loc-name {
    font-size: 11.5px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    margin-bottom: 3px;
}

.tpl-loc-price {
    font-size: 11px;
    color: #999;
    transition: color 0.15s;
}
.tpl-loc-card.tpl-selected .tpl-loc-price { color: #e91e8c; font-weight: 600; }

/* ── Selected items list ──────────────────────────── */
.tpl-sel-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.tpl-sel-item {
    border: 1px solid #e8e6e1;
    border-radius: 10px;
    background: #fff;
    padding: 12px 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.tpl-sel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.tpl-sel-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tpl-sel-icon { width: 40px; height: 40px; flex-shrink: 0; }
.tpl-sel-icon-img,
.tpl-sel-icon .tpl-tshirt-svg { width: 40px; height: 40px; object-fit: contain; }

.tpl-sel-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.tpl-sel-name {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tpl-sel-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    padding: 2px 7px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.tpl-tag-base    { background: #fce4f4; color: #b8116a; }
.tpl-tag-repeat  { background: #e6f0ff; color: #1a5ec4; }

.tpl-sel-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tpl-sel-price {
    font-size: 14px;
    font-weight: 700;
    color: #e91e8c;
}

.tpl-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #ccc;
    padding: 3px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.1s, background 0.1s;
}
.tpl-remove:hover { color: #d00; background: #fff0f0; }

/* ── Upload zone ──────────────────────────────────── */
.tpl-sel-upload { margin-top: 4px; }

.tpl-upload-zone {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px dashed #d8d5cf;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    background: #fafaf9;
    color: #999;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.tpl-upload-zone:hover {
    border-color: #e91e8c;
    background: #fdf5fb;
    color: #e91e8c;
}

.tpl-upload-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.tpl-up-label { font-size: 12px; font-weight: 600; }
.tpl-up-sub   { font-size: 11px; color: #bbb; }

input.tpl-file-input { display: none; }

/* File info states */
.tpl-file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    padding: 9px 12px;
    background: #eaf9f2;
    border: 1px solid #9FE1CB;
}

.tpl-file-info.tpl-uploading {
    background: #f5f5f5;
    border-color: #ddd;
}

.tpl-file-info.tpl-upload-error {
    background: #fff5f5;
    border-color: #f5c6c6;
}

.tpl-file-icon { display: flex; align-items: center; flex-shrink: 0; }

.tpl-spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid #ddd;
    border-top-color: #e91e8c;
    border-radius: 50%;
    animation: tpl-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes tpl-spin { to { transform: rotate(360deg); } }

.tpl-file-name {
    flex: 1;
    font-size: 12px;
    color: #0a6644;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tpl-upload-error .tpl-file-name { color: #b00; }
.tpl-uploading   .tpl-file-name  { color: #777; }

.tpl-file-remove {
    background: none;
    border: none;
    font-size: 11px;
    color: #0a6644;
    cursor: pointer;
    text-decoration: underline;
    flex-shrink: 0;
    padding: 0;
    white-space: nowrap;
}
.tpl-file-remove:hover { color: #d00; }

/* ── File Check section ───────────────────────────── */
.tpl-fc-section {
    margin-bottom: 14px;
}

.tpl-fc-label { margin-bottom: 8px; }

.tpl-fc-options {
    border: 1px solid #e2e0db;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.tpl-fc-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0ede8;
    transition: background 0.12s;
    position: relative;
}
.tpl-fc-option:last-child { border-bottom: none; }
.tpl-fc-option:hover { background: #fdf9fd; }

.tpl-fc-option input[type="radio"] { display: none; }

/* Custom radio box */
.tpl-fc-radio-box {
    width: 18px; height: 18px;
    border: 2px solid #d0cdc6;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s;
    background: #fff;
}
.tpl-fc-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #e91e8c;
    transform: scale(0);
    transition: transform 0.15s;
}

.tpl-fc-option input[type="radio"]:checked ~ .tpl-fc-radio-box {
    border-color: #e91e8c;
}
.tpl-fc-option input[type="radio"]:checked ~ .tpl-fc-radio-box .tpl-fc-dot {
    transform: scale(1);
}
.tpl-fc-option:has(input:checked) {
    background: #fdf5fb;
}

/* Texts */
.tpl-fc-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.tpl-fc-name {
    font-size: 13px;
    font-weight: 600;
    color: #222;
}
.tpl-fc-desc {
    font-size: 11px;
    color: #999;
    line-height: 1.4;
}

.tpl-fc-price {
    font-size: 13px;
    font-weight: 700;
    color: #e91e8c;
    flex-shrink: 0;
    white-space: nowrap;
}
.tpl-fc-free {
    color: #1D9E75;
}

/* ── Summary ──────────────────────────────────────── */
.tpl-summary {
    background: #f9f8f6;
    border-radius: 10px;
    padding: 13px 16px;
    border: 1px solid #eae8e2;
}

.tpl-empty-hint {
    font-size: 12px;
    color: #bbb;
    text-align: center;
    margin: 0;
    padding: 4px 0;
}

.tpl-sum-rows { margin-bottom: 8px; }

.tpl-sum-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    color: #666;
    padding: 3px 0;
}
.tpl-sum-row em { font-style: normal; color: #bbb; font-size: 11px; margin-left: 2px; }
.tpl-sum-fc     { color: #555; }

.tpl-sum-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    color: #111;
    border-top: 1px solid #e2e0db;
    padding-top: 9px;
    margin-top: 5px;
}
.tpl-minimum-msg{
    background:#fff3cd;
    color:#856404;
    padding:12px 14px;
    border-radius:8px;
    font-size:13px;
    margin-bottom:12px;
    line-height:1.5;
    border:1px solid #ffe69c;
}
.tpl-summary{
	display:none;
}




.tpl-fc-info-link {
    font-size: 11px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    margin-left: 6px;
    white-space: nowrap;
}
.tpl-fc-info-link:hover {
    text-decoration: underline;
}