/*
 * Styles for the parts of the Flask shop that the compiled builder stylesheet
 * (base.css) has no classes for. base.css is a finished Tailwind build: a
 * utility class that was not used on the old site does not exist in it.
 */

.tshirt-skip {
    position: absolute;
    left: -9999px;
}
.tshirt-skip:focus {
    left: 1rem;
    top: 1rem;
    z-index: 100;
    background: #fff;
    color: #000;
    padding: .5rem 1rem;
}

.tshirt-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* logo */
.tshirt-logo {
    display: inline-block;
    max-width: 100%;
    min-width: min(120px, 156px);
}
.tshirt-logo img {
    display: block;
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* cart count badge */
.tshirt-cart-count {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--primary, #1d4ed8);
    color: var(--primary-foreground, #fff);
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
.tshirt-cart-count[hidden] {
    display: none;
}

/* Collections dropdown */
.tshirt-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 60;
    min-width: 13rem;
    padding: .375rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    background: var(--popover, #fff);
    color: var(--popover-foreground, #111);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}
.tshirt-menu-panel[hidden] {
    display: none;
}
.tshirt-menu-panel a {
    display: block;
    padding: .5rem .75rem;
    border-radius: 4px;
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
}
.tshirt-menu-panel a:hover,
.tshirt-menu-panel a:focus {
    background: var(--accent, #f3f4f6);
    color: var(--primary, #1d4ed8);
    outline: none;
}

/* mobile menu drawer */
.tshirt-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, .5);
}
.tshirt-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 91;
    width: min(22rem, 88vw);
    padding: 1rem 1.25rem 2rem;
    overflow-y: auto;
    background: var(--background, #fff);
    color: var(--foreground, #111);
    box-shadow: -10px 0 30px rgba(0, 0, 0, .2);
}
.tshirt-drawer[hidden],
.tshirt-drawer-backdrop[hidden] {
    display: none;
}
.tshirt-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .8rem;
}
.tshirt-drawer-head button {
    padding: .25rem;
    cursor: pointer;
}
.tshirt-drawer-search input {
    width: 100%;
    height: 2.5rem;
    margin-bottom: 1rem;
    padding: 0 .75rem;
    border: 1px solid var(--input, #d1d5db);
    border-radius: 6px;
    background: transparent;
    font-size: .9rem;
}
.tshirt-drawer nav a {
    display: block;
    padding: .7rem 0;
    border-bottom: 1px solid var(--border, #e5e7eb);
    font-weight: 600;
}
.tshirt-drawer nav a.tshirt-drawer-sub {
    padding-left: 1rem;
    font-weight: 500;
    font-size: .9rem;
}
.tshirt-drawer-group {
    padding: .9rem 0 .3rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .6;
}

/* flash messages */
.tshirt-flashes {
    max-width: 1280px;
    margin: 1rem auto 0;
    padding: 0 1rem;
}
.tshirt-flash {
    padding: .75rem 1rem;
    border: 1px solid var(--border, #e5e7eb);
    border-left: 4px solid var(--primary, #1d4ed8);
    border-radius: 4px;
    background: var(--card, #fff);
    font-size: .9rem;
}
.tshirt-flash + .tshirt-flash {
    margin-top: .5rem;
}
.tshirt-flash-error {
    border-left-color: var(--destructive, #dc2626);
}
.tshirt-flash-success {
    border-left-color: #16a34a;
}

.tshirt-logo-footer {
    height: 3rem;
    padding: 4px 8px;
    border-radius: 4px;
    background: #fff;
}

/* ---------------------------------------------------------------- shop page */

.tshirt-select {
    height: 2.25rem;
    padding: 0 2rem 0 .75rem;
    border: 1px solid var(--input, #d1d5db);
    border-radius: 6px;
    background: var(--background, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right .7rem center;
    color: inherit;
    font-size: .8rem;
    font-weight: 500;
    appearance: none;
    cursor: pointer;
}

.tshirt-chip {
    cursor: pointer;
    user-select: none;
}
.tshirt-chip input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.tshirt-chip:has(input:checked) {
    background: var(--primary, #1d4ed8);
    border-color: var(--primary, #1d4ed8);
    color: var(--primary-foreground, #fff);
}
.tshirt-chip:has(input:focus-visible) {
    outline: 2px solid var(--ring, #1d4ed8);
    outline-offset: 2px;
}

.tshirt-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 6px;
    border-radius: 50%;
    background: var(--primary, #1d4ed8);
}

.tshirt-badge {
    padding: 2px 8px;
    border-radius: 3px;
    background: var(--primary, #1d4ed8);
    color: var(--primary-foreground, #fff);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.tshirt-badge-muted {
    background: #111;
    color: #fff;
}

.tshirt-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .375rem;
    margin-top: 2rem;
}
.tshirt-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 .5rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 600;
}
.tshirt-pagination a:hover {
    border-color: var(--primary, #1d4ed8);
    color: var(--primary, #1d4ed8);
}
.tshirt-pagination a[aria-current="page"] {
    background: var(--primary, #1d4ed8);
    border-color: var(--primary, #1d4ed8);
    color: var(--primary-foreground, #fff);
}

.tshirt-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    padding: 4rem 1rem;
    border: 1px dashed var(--border, #e5e7eb);
    border-radius: 8px;
    text-align: center;
}

/* The filter form submits itself when JavaScript runs; the button is the fallback. */
.js .tshirt-filter-apply {
    display: none;
}
.tshirt-filter-close {
    display: none;
    cursor: pointer;
}

/* Below the desktop breakpoint the filter column becomes a slide-in panel. */
@media (max-width: 1023.98px) {
    .tshirt-filter-panel {
        display: none;
    }
    .tshirt-filter-panel.is-open {
        display: block;
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 91;
        width: min(22rem, 90vw);
        padding: 1rem;
        overflow-y: auto;
        background: var(--background, #fff);
        box-shadow: 10px 0 30px rgba(0, 0, 0, .2);
    }
    .tshirt-filter-panel.is-open .tshirt-filter-close {
        display: inline-flex;
    }
}
@media (min-width: 1024px) {
    .tshirt-filter-panel {
        display: block;
    }
}

/* -------------------------------------------------------------- product page */

.tshirt-badge-corner {
    position: absolute;
    top: .75rem;
    left: .75rem;
}
.tshirt-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.tshirt-thumbs button {
    width: 4.5rem;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 4px;
    cursor: pointer;
}
.tshirt-thumbs button[aria-current="true"] {
    border-color: var(--primary, #1d4ed8);
    box-shadow: 0 0 0 1px var(--primary, #1d4ed8);
}
.tshirt-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tshirt-size {
    position: relative;
    cursor: pointer;
    user-select: none;
}
.tshirt-size input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.tshirt-size:has(input:checked) {
    background: var(--primary, #1d4ed8);
    border-color: var(--primary, #1d4ed8);
    color: var(--primary-foreground, #fff);
}
.tshirt-size:has(input:focus-visible) {
    outline: 2px solid var(--ring, #1d4ed8);
    outline-offset: 2px;
}
.tshirt-size.is-unavailable {
    opacity: .4;
    text-decoration: line-through;
    cursor: not-allowed;
}

.tshirt-form-note {
    font-size: .8rem;
    color: var(--muted-foreground, #6b7280);
}
.tshirt-form-note.is-error {
    color: var(--destructive, #dc2626);
}
.tshirt-pre-line {
    white-space: pre-line;
}
[data-accordion-panel][hidden] {
    display: none;
}

/* ------------------------------------------------------------- simple pages */

.tshirt-empty-page {
    text-align: center;
}
.tshirt-big-number {
    font-size: clamp(4rem, 14vw, 9rem);
    font-weight: 800;
    line-height: 1;
    color: var(--primary, #1d4ed8);
}
.tshirt-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
    margin-top: 1.5rem;
}

/* ----------------------------------------------------------- cart, checkout */

.tshirt-coupon-on {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem .75rem;
    border: 1px dashed var(--primary, #1d4ed8);
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 600;
}
.tshirt-coupon-on span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.tshirt-coupon-on button {
    font-size: .75rem;
    text-decoration: underline;
    cursor: pointer;
}

.tshirt-field-error {
    margin-top: .35rem;
    font-size: .78rem;
    color: var(--destructive, #dc2626);
}
.tshirt-textarea {
    height: auto;
    min-height: 5rem;
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.tshirt-option input[type="radio"] {
    width: 1rem;
    height: 1rem;
    flex: none;
    accent-color: var(--primary, #1d4ed8);
}
.tshirt-option:not(:has(input:checked)) {
    border-color: var(--border, #e5e7eb);
    background: transparent;
}
.tshirt-option:has(input:focus-visible) {
    outline: 2px solid var(--ring, #1d4ed8);
    outline-offset: 2px;
}

.tshirt-terms {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    font-size: .82rem;
    cursor: pointer;
}
.tshirt-terms input {
    margin-top: .2rem;
    accent-color: var(--primary, #1d4ed8);
}
.tshirt-terms a {
    color: var(--primary, #1d4ed8);
    text-decoration: underline;
}

/* delivery point picker (static/js/checkout.js) */
.tdp {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    background: var(--muted, #f9fafb);
}
.tdp[hidden] {
    display: none;
}
.tdp-title {
    margin-bottom: .6rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.tdp-input {
    width: 100%;
    height: 2.5rem;
    padding: 0 .75rem;
    border: 1px solid var(--input, #d1d5db);
    border-radius: 6px;
    background: var(--background, #fff);
    font-size: .9rem;
}
.tdp-list {
    max-height: 18rem;
    margin-top: .5rem;
    overflow-y: auto;
}
.tdp-item {
    display: block;
    width: 100%;
    padding: .55rem .6rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
    text-align: left;
    font-size: .82rem;
    cursor: pointer;
}
.tdp-item:hover,
.tdp-item:focus {
    background: var(--accent, #eef2ff);
    outline: none;
}
.tdp-item span {
    display: block;
    color: var(--muted-foreground, #6b7280);
}
.tdp-item small {
    color: var(--primary, #1d4ed8);
}
.tdp-note {
    padding: .5rem 0;
    font-size: .8rem;
    color: var(--muted-foreground, #6b7280);
}
.tdp-chosen {
    font-size: .88rem;
}
.tdp-link {
    display: inline-block;
    margin: .5rem 0 0 .5rem;
    font-size: .8rem;
    color: var(--primary, #1d4ed8);
    text-decoration: underline;
    cursor: pointer;
}
.tdp-button {
    padding: .6rem 1rem;
    border-radius: 6px;
    background: var(--primary, #1d4ed8);
    color: var(--primary-foreground, #fff);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}
.tdp-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, .6);
}
.tdp-modal-panel {
    position: relative;
    width: min(900px, 100%);
    height: min(700px, 90vh);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.tdp-modal-panel iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.tdp-modal-close {
    position: absolute;
    top: .5rem;
    right: .5rem;
    z-index: 1;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

/* payment page */
.tshirt-pay-form {
    display: grid;
    gap: 1rem;
    margin: 1.5rem auto;
    max-width: 30rem;
    text-align: left;
}
.tshirt-test-note {
    padding: .6rem .8rem;
    border: 1px dashed #d97706;
    border-radius: 6px;
    background: #fffbeb;
    color: #92400e;
    font-size: .8rem;
}
.tshirt-spin {
    animation: tshirt-spin 1s linear infinite;
}
@keyframes tshirt-spin {
    to { transform: rotate(360deg); }
}

/* order details (confirmation, payment page, order tracking, account) */
.tshirt-order-wrap {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border, #e5e7eb);
    text-align: left;
}
.tshirt-order-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}
.tshirt-order-status dt {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted-foreground, #6b7280);
}
.tshirt-order-status dd {
    font-size: .9rem;
    font-weight: 600;
}
.tshirt-order-tracking {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin-bottom: .75rem;
    font-size: .85rem;
}
.tshirt-order-tracking a {
    color: var(--primary, #1d4ed8);
    text-decoration: underline;
}
.tshirt-order-items {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}
.tshirt-order-items td {
    padding: .5rem .4rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
    vertical-align: middle;
}
.tshirt-order-items td:last-child {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.tshirt-order-items img {
    width: 3rem;
    height: 3.75rem;
    object-fit: cover;
    border-radius: 4px;
}
.tshirt-order-items tbody td:first-child {
    width: 3.5rem;
}
.tshirt-order-items tfoot td {
    border-bottom: 0;
    padding: .25rem .4rem;
    color: var(--muted-foreground, #6b7280);
}
.tshirt-order-items tfoot .is-total td {
    padding-top: .6rem;
    border-top: 1px solid var(--border, #e5e7eb);
    color: inherit;
    font-size: 1rem;
    font-weight: 700;
}
.tshirt-order-items tfoot .is-muted td {
    font-size: .75rem;
}
.tshirt-order-address {
    margin-top: 1rem;
    font-size: .85rem;
}
.tshirt-order-address h3 {
    margin-bottom: .25rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted-foreground, #6b7280);
}

/* ------------------------------------------------------------------ account */

.tshirt-captcha {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    background: var(--muted, #f9fafb);
    font-size: .9rem;
}
.tshirt-captcha.is-error {
    border-color: var(--destructive, #dc2626);
}
.tshirt-captcha label {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    cursor: pointer;
}
.tshirt-captcha input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary, #1d4ed8);
}
.tshirt-captcha-state {
    font-size: .78rem;
    color: var(--muted-foreground, #6b7280);
}

.tshirt-account {
    display: grid;
    gap: 2rem;
}
@media (min-width: 900px) {
    .tshirt-account {
        grid-template-columns: 16rem 1fr;
        align-items: start;
    }
}
.tshirt-account-nav {
    padding: 1rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    background: var(--card, #fff);
}
.tshirt-account-user {
    padding: 0 .5rem .75rem;
    margin-bottom: .5rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
    font-weight: 700;
}
.tshirt-account-user small {
    display: block;
    font-weight: 400;
    font-size: .75rem;
    color: var(--muted-foreground, #6b7280);
    word-break: break-all;
}
.tshirt-account-nav a,
.tshirt-account-nav button {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: 100%;
    padding: .55rem .5rem;
    border-radius: 4px;
    font-size: .88rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}
.tshirt-account-nav a:hover,
.tshirt-account-nav button:hover {
    background: var(--accent, #f3f4f6);
}
.tshirt-account-nav a[aria-current="page"] {
    background: var(--primary, #1d4ed8);
    color: var(--primary-foreground, #fff);
}
.tshirt-account-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 700;
}
.tshirt-account-form + .tshirt-account-title {
    margin-top: 2.5rem;
}
.tshirt-account-form {
    display: grid;
    gap: 1rem;
    max-width: 30rem;
}
.tshirt-actions-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.tshirt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
.tshirt-table th,
.tshirt-table td {
    padding: .65rem .5rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
    text-align: left;
    vertical-align: top;
}
.tshirt-table th {
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted-foreground, #6b7280);
}
.tshirt-table a,
.tshirt-link,
.tshirt-back {
    color: var(--primary, #1d4ed8);
    text-decoration: underline;
    cursor: pointer;
}
.tshirt-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: 1rem;
    font-size: .85rem;
}
.tshirt-address-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.tshirt-address {
    padding: 1rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    font-size: .88rem;
}
.tshirt-address form {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: .75rem;
    font-size: .8rem;
}
.tshirt-address form a,
.tshirt-address form button {
    color: var(--primary, #1d4ed8);
    text-decoration: underline;
    cursor: pointer;
}

/* ------------------------------------------------------- sell us your shirts */

.tshirt-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.tshirt-dropzone {
    display: block;
}
.tshirt-dropzone:has(input:focus-visible) {
    outline: 2px solid var(--ring, #1d4ed8);
    outline-offset: 2px;
}
.tshirt-dropzone.has-files {
    border-color: var(--primary, #1d4ed8);
    border-style: solid;
}
.tsr-field .tshirt-field-error {
    font-style: normal;
}

/* show / hide password button (static/js/password-toggle.js) */
.pw-wrap {
    position: relative;
    display: block;
}
.pw-wrap input {
    padding-right: 2.75rem;
}
.pw-toggle {
    position: absolute;
    top: 50%;
    right: .35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #6b7280;
    transform: translateY(-50%);
    cursor: pointer;
}
.pw-toggle:hover {
    color: #111827;
}
.pw-toggle:focus-visible {
    outline: 2px solid #1a4fc0;
    outline-offset: 1px;
}
