/**
 * 2026 HotWebDesign - Christos A. Daggas
 * Order Withdraw — storefront styles. Proprietary, see LICENSE.md.
 *
 * Deliberately restrained. A withdrawal page belongs to the shop's theme, not to
 * this module, so type, colour and spacing are inherited wherever possible and
 * only structure is asserted. Colours come from custom properties, which lets a
 * theme override the whole palette with three declarations.
 */

.psm-orderwithdraw,
.psm-orderwithdraw-order-block,
.psm-orderwithdraw-confirmation,
.psm-orderwithdraw-product-notice,
.psm-orderwithdraw-waiver,
.psm-orderwithdraw-modal {
    --psm-ow-line: #e3e3e3;
    --psm-ow-surface: #fafafa;
    --psm-ow-muted: #6b6b6b;
    --psm-ow-accent: #1d1d1b;
    --psm-ow-warn: #b23c17;
    --psm-ow-good: #2e7d32;
    --psm-ow-radius: 0;
}

/* ======================================================= page shell */

.psm-orderwithdraw {
    max-width: 760px;
}

.psm-orderwithdraw-title {
    margin: 0 0 8px;
}

.psm-orderwithdraw-subtitle {
    font-size: 1.05em;
    margin: 24px 0 10px;
}

.psm-orderwithdraw-intro {
    color: var(--psm-ow-muted);
    margin-bottom: 20px;
}

.psm-orderwithdraw-block + .psm-orderwithdraw-block {
    margin-top: 28px;
}

.psm-orderwithdraw-empty {
    color: var(--psm-ow-muted);
    font-style: italic;
}

.psm-orderwithdraw-hint {
    font-size: .9em;
    color: var(--psm-ow-muted);
    margin: 4px 0 10px;
}

.psm-orderwithdraw-footnote {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.psm-orderwithdraw-link {
    text-decoration: underline;
}

.psm-orderwithdraw-link--quiet {
    background: none;
    border: 0;
    padding: 0;
    color: var(--psm-ow-muted);
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
}

.psm-orderwithdraw-soon {
    color: var(--psm-ow-warn);
}

/* =========================================================== cards */

.psm-orderwithdraw-cards {
    list-style: none;
    padding: 0;
    margin: 0;
}

.psm-orderwithdraw-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--psm-ow-line);
}

.psm-orderwithdraw-card-main {
    flex: 1 1 240px;
    min-width: 0;
}

.psm-orderwithdraw-card-ref {
    display: block;
    font-weight: 600;
}

.psm-orderwithdraw-card-meta {
    display: block;
    font-size: .9em;
    color: var(--psm-ow-muted);
}

.psm-orderwithdraw-card-side {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.psm-orderwithdraw-days {
    font-size: .9em;
    color: var(--psm-ow-muted);
}

.psm-orderwithdraw-days.is-soon {
    color: var(--psm-ow-warn);
    font-weight: 600;
}

/* ======================================================== statuses */

.psm-orderwithdraw-status {
    display: inline-block;
    padding: 2px 9px;
    font-size: .82em;
    line-height: 1.6;
    border: 1px solid var(--psm-ow-line);
    background: var(--psm-ow-surface);
    color: var(--psm-ow-muted);
    white-space: nowrap;
}

.psm-orderwithdraw-status--open { border-color: #d9a441; color: #8a5a00; background: #fff8e8; }
.psm-orderwithdraw-status--granted { border-color: #8fbf92; color: var(--psm-ow-good); background: #f1f8f1; }
.psm-orderwithdraw-status--settled { border-color: #8fb4d0; color: #0b5f8a; background: #f0f7fb; }
.psm-orderwithdraw-status--declined { border-color: #d3a099; color: var(--psm-ow-warn); background: #fdf3f1; }

/* =========================================================== form */

.psm-orderwithdraw-form--narrow {
    max-width: 420px;
}

.psm-orderwithdraw-fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 28px;
}

.psm-orderwithdraw-fieldset legend {
    font-size: 1.05em;
    font-weight: 600;
    margin-bottom: 10px;
    padding: 0;
    width: auto;
    border: 0;
}

.psm-orderwithdraw-errors {
    list-style: none;
    padding: 12px 14px;
    margin: 0 0 20px;
    border-left: 3px solid var(--psm-ow-warn);
    background: #fdf3f1;
    color: var(--psm-ow-warn);
}

/* ------------------------------------------------------ item lines */

.psm-orderwithdraw-lines {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--psm-ow-line);
}

.psm-orderwithdraw-line {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--psm-ow-line);
    cursor: pointer;
    transition: background-color .12s ease;
}

.psm-orderwithdraw-line:hover {
    background: var(--psm-ow-surface);
}

.psm-orderwithdraw-line.is-picked {
    background: var(--psm-ow-surface);
    box-shadow: inset 3px 0 0 var(--psm-ow-accent);
}

.psm-orderwithdraw-line.is-blocked {
    cursor: default;
    opacity: .7;
}

.psm-orderwithdraw-line.is-blocked:hover {
    background: none;
}

.psm-orderwithdraw-line-pick {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    flex: 1 1 260px;
    cursor: pointer;
}

.psm-orderwithdraw-line-body {
    display: block;
    min-width: 0;
}

.psm-orderwithdraw-line-name {
    display: block;
    font-weight: 500;
}

.psm-orderwithdraw-line-meta,
.psm-orderwithdraw-line-block {
    display: block;
    font-size: .9em;
    color: var(--psm-ow-muted);
    margin-top: 2px;
}

.psm-orderwithdraw-line-block em {
    display: block;
    margin-top: 2px;
}

.psm-orderwithdraw-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.psm-orderwithdraw-qty input {
    width: 72px;
}

.psm-orderwithdraw-qty-max {
    font-size: .9em;
    color: var(--psm-ow-muted);
}

/* --------------------------------------------------- exchange picker */

.psm-orderwithdraw-swap {
    margin-top: 14px;
    padding: 14px;
    background: var(--psm-ow-surface);
    border: 1px solid var(--psm-ow-line);
}

.psm-orderwithdraw-swap-results {
    border: 1px solid var(--psm-ow-line);
    background: #fff;
    max-height: 220px;
    overflow-y: auto;
    margin-top: 6px;
}

.psm-orderwithdraw-swap-hit {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--psm-ow-line);
    cursor: pointer;
    font: inherit;
}

.psm-orderwithdraw-swap-hit:hover,
.psm-orderwithdraw-swap-hit:focus {
    background: var(--psm-ow-surface);
}

.psm-orderwithdraw-swap [hidden] {
    display: none;
}

.psm-orderwithdraw-swap select,
.psm-orderwithdraw-swap input[type='number'] {
    margin-top: 8px;
}

.psm-orderwithdraw-narrow {
    max-width: 120px;
}

/* ------------------------------------------------------ declaration */

.psm-orderwithdraw-legal {
    padding: 16px;
    background: var(--psm-ow-surface);
    border: 1px solid var(--psm-ow-line);
}

.psm-orderwithdraw-legal-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

.psm-orderwithdraw-files-field {
    margin-top: 14px;
}

.psm-orderwithdraw-actions {
    margin-top: 24px;
}

/* ==================================================== confirmation */

.psm-orderwithdraw-summary-box {
    border: 1px solid var(--psm-ow-line);
    padding: 16px;
    margin: 20px 0;
}

.psm-orderwithdraw-summary-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.psm-orderwithdraw-summary-line + .psm-orderwithdraw-summary-line {
    border-top: 1px solid var(--psm-ow-line);
}

.psm-orderwithdraw-steps {
    padding-left: 20px;
}

.psm-orderwithdraw-steps li {
    margin-bottom: 8px;
}

/* ========================================================= detail */

.psm-orderwithdraw-callout {
    padding: 16px;
    margin: 20px 0;
    border-left: 3px solid var(--psm-ow-line);
    background: var(--psm-ow-surface);
}

.psm-orderwithdraw-callout.is-good { border-left-color: var(--psm-ow-good); }
.psm-orderwithdraw-callout.is-bad { border-left-color: var(--psm-ow-warn); }

.psm-orderwithdraw-callout .psm-orderwithdraw-subtitle {
    margin-top: 0;
}

.psm-orderwithdraw-address {
    font-style: normal;
}

.psm-orderwithdraw-items,
.psm-orderwithdraw-files,
.psm-orderwithdraw-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.psm-orderwithdraw-items li,
.psm-orderwithdraw-files li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--psm-ow-line);
}

.psm-orderwithdraw-item-qty {
    color: var(--psm-ow-muted);
}

.psm-orderwithdraw-item-total {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.psm-orderwithdraw-items-total {
    font-weight: 600;
    border-bottom: 0;
    border-top: 2px solid var(--psm-ow-accent);
}

.psm-orderwithdraw-file-size {
    color: var(--psm-ow-muted);
    font-size: .9em;
}

.psm-orderwithdraw-timeline {
    border-left: 2px solid var(--psm-ow-line);
    margin-top: 8px;
}

.psm-orderwithdraw-timeline li {
    position: relative;
    padding: 0 0 14px 18px;
}

.psm-orderwithdraw-timeline li::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--psm-ow-accent);
}

.psm-orderwithdraw-timeline-when {
    display: block;
    font-size: .85em;
    color: var(--psm-ow-muted);
}

.psm-orderwithdraw-retract {
    display: inline;
}

/* ====================================== blocks injected into themes */

.psm-orderwithdraw-order-block,
.psm-orderwithdraw-confirmation {
    margin: 24px 0;
    padding: 18px;
    border: 1px solid var(--psm-ow-line);
    background: var(--psm-ow-surface);
}

.psm-orderwithdraw-order-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05em;
    margin: 0 0 8px;
}

.psm-orderwithdraw-order-title .material-icons {
    font-size: 20px;
    color: var(--psm-ow-muted);
}

.psm-orderwithdraw-order-line {
    margin: 0 0 12px;
}

.psm-orderwithdraw-order-line--quiet {
    color: var(--psm-ow-muted);
    margin-bottom: 0;
}

.psm-orderwithdraw-order-cta {
    margin-top: 4px;
}

/* -------------------------------------------------- product notice */

.psm-orderwithdraw-product-notice {
    margin: 12px 0;
    font-size: .92em;
}

.psm-orderwithdraw-product-notice p {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 6px;
}

.psm-orderwithdraw-product-notice .material-icons {
    font-size: 18px;
    color: var(--psm-ow-muted);
    flex: none;
}

.psm-orderwithdraw-product-notice.is-excluded .material-icons {
    color: var(--psm-ow-warn);
}

.psm-orderwithdraw-product-note {
    display: block;
    color: var(--psm-ow-muted);
    font-size: .95em;
}

/* -------------------------------------------------------- waiver */

.psm-orderwithdraw-waiver {
    margin: 16px 0;
    padding: 14px;
    border: 1px solid var(--psm-ow-line);
    background: var(--psm-ow-surface);
}

.psm-orderwithdraw-waiver-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    cursor: pointer;
}

.psm-orderwithdraw-waiver-note {
    margin: 8px 0 0 28px;
    font-size: .9em;
    color: var(--psm-ow-muted);
}

.psm-orderwithdraw-waiver-status {
    display: block;
    margin-top: 6px;
    color: var(--psm-ow-warn);
    font-size: .9em;
}

/* -------------------------------------------------- account, footer */

.psm-orderwithdraw-account-tile .material-icons {
    font-size: 20px;
    vertical-align: -4px;
    margin-right: 4px;
}

.psm-orderwithdraw-footer-entry.is-standalone {
    display: block;
    margin: 12px 0;
}

.psm-orderwithdraw-history-link {
    display: inline-block;
    margin-left: 8px;
    text-decoration: underline;
    white-space: nowrap;
}

.psm-orderwithdraw-history-link.is-quiet {
    color: var(--psm-ow-muted);
}

/* ========================================================== modal */

.psm-orderwithdraw-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .45);
}

.psm-orderwithdraw-modal-box {
    background: #fff;
    max-width: 460px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
}

.psm-orderwithdraw-modal-box h2 {
    margin: 0 0 10px;
    font-size: 1.15em;
}

.psm-orderwithdraw-modal-box p {
    color: var(--psm-ow-muted);
    margin: 0 0 20px;
}

.psm-orderwithdraw-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===================================================== responsive */

@media (max-width: 600px) {
    .psm-orderwithdraw-card-side {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }

    .psm-orderwithdraw-qty {
        margin-left: 0;
        width: 100%;
    }

    .psm-orderwithdraw-footnote {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Respect a visitor who has asked for less motion. */
@media (prefers-reduced-motion: reduce) {
    .psm-orderwithdraw-line {
        transition: none;
    }
}
