/* =========================================================
 * Luxe Minimal - Order Pages (order.css)
 * 訂單查詢起始頁 / 訂單列表 / 訂單詳細 modal 共用樣式
 * ========================================================= */

/* ---------- Page Wrap ---------- */
.order-wrap
{
    padding: 40px 0 80px;
    background: var(--surface);
    min-height: 60vh;
}

@media (max-width: 768px)
{
    .order-wrap
    {
        padding: 24px 0 60px;
    }
}

/* ---------- Page Title ---------- */
.order-page-head
{
    text-align: center;
    margin-bottom: 36px;
}

.order-page-head .lm-eyebrow
{
    margin-bottom: 14px;
}

.order-page-head h1
{
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0 0 10px 0;
}

.order-page-head .order-page-desc
{
    font-size: 14px;
    color: var(--ink-muted);
    margin: 0;
}

@media (max-width: 768px)
{
    .order-page-head h1
    {
        font-size: 28px;
    }
}

/* ---------- Header Bar (member only LINE binding) ---------- */
.order-head-bar
{
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding: 24px;
    background: var(--surface-card);
    border: 1px solid var(--brand-lighter);
    border-radius: 14px;
}

.order-head-bar-title h1
{
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0 0 6px 0;
}

.order-head-bar-title p
{
    font-size: 14px;
    color: var(--ink-muted);
    margin: 0;
}

.order-line-binding-btn
{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #06c755;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    border-radius: 999px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.order-line-binding-btn:hover
{
    background: #05a647;
    transform: translateY(-1px);
}

.order-line-binding-btn svg
{
    width: 16px;
    height: 16px;
    fill: #ffffff;
}

.order-line-bound-badge
{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: rgba(47, 143, 78, 0.10);
    color: var(--success);
    font-size: 13px;
    font-weight: 500;
    border-radius: 999px;
    border: 1px solid rgba(47, 143, 78, 0.25);
}

.order-line-bound-badge svg
{
    width: 14px;
    height: 14px;
}

@media (max-width: 540px)
{
    .order-head-bar
    {
        padding: 18px;
    }

    .order-head-bar-title h1
    {
        font-size: 22px;
    }
}

/* ---------- Toolbar (filter + search) ---------- */
.order-toolbar
{
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

@media (max-width: 640px)
{
    .order-toolbar
    {
        grid-template-columns: 1fr;
    }
}

.order-toolbar select,
.order-toolbar input[type="text"]
{
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    background: var(--surface-card);
    border: 1px solid var(--brand-lighter);
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.order-toolbar select:focus,
.order-toolbar input[type="text"]:focus
{
    outline: none;
    border-color: var(--brand-dark);
    box-shadow: 0 0 0 3px rgba(180, 149, 144, 0.15);
}

.order-toolbar-search
{
    display: flex;
    gap: 10px;
}

.order-toolbar-search input
{
    flex: 1;
}

.order-toolbar-search button
{
    padding: 0 22px;
    background: var(--brand-dark);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.order-toolbar-search button:hover
{
    background: var(--brand-darker);
}

.order-toolbar-search button svg
{
    width: 18px;
    height: 18px;
}

/* ---------- Order Card ---------- */
.order-list
{
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-card
{
    background: var(--surface-card);
    border: 1px solid var(--brand-lighter);
    border-radius: 14px;
    padding: 24px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.order-card:hover
{
    border-color: var(--brand-light);
    box-shadow: 0 6px 24px rgba(180, 149, 144, 0.10);
    transform: translateY(-2px);
}

.order-card-header
{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--brand-lighter);
}

.order-card-sn
{
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 500;
    color: var(--brand-darker);
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.order-card-sn:hover
{
    color: var(--brand-dark);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.order-card-sn-prefix
{
    color: var(--ink-muted);
    margin-right: 2px;
    font-family: var(--font-sans);
    font-weight: 400;
}

.order-card-actions
{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------- Status Badge ---------- */
.order-status-badge
{
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    border-radius: 999px;
    border: 1px solid transparent;
}

.order-status-badge.is-pending
{
    background: rgba(196, 59, 59, 0.08);
    color: var(--danger);
    border-color: rgba(196, 59, 59, 0.20);
}

.order-status-badge.is-processing
{
    background: rgba(201, 176, 172, 0.20);
    color: var(--brand-darker);
    border-color: var(--brand-light);
}

.order-status-badge.is-shipping
{
    background: rgba(47, 143, 78, 0.10);
    color: var(--success);
    border-color: rgba(47, 143, 78, 0.25);
}

.order-status-badge.is-completed
{
    background: rgba(47, 143, 78, 0.10);
    color: var(--success);
    border-color: rgba(47, 143, 78, 0.25);
}

.order-status-badge.is-cancelled
{
    background: rgba(136, 136, 136, 0.10);
    color: var(--ink-muted);
    border-color: rgba(136, 136, 136, 0.25);
    text-decoration: line-through;
}

/* ---------- Repay Button ---------- */
.order-repay-btn
{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    background: var(--brand-dark);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    border-radius: 999px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.order-repay-btn:hover
{
    background: var(--brand-darker);
    color: #ffffff;
    transform: translateY(-1px);
}

.order-repay-btn svg
{
    width: 12px;
    height: 12px;
}

/* ---------- Order Detail Grid ---------- */
.order-detail-grid
{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.order-detail-item
{
    padding: 12px 14px;
    background: var(--surface-warm);
    border-radius: 10px;
    border-left: 3px solid var(--brand-light);
}

.order-detail-label
{
    display: block;
    font-size: 11px;
    color: var(--ink-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.order-detail-value
{
    font-size: 14px;
    color: var(--ink);
    font-weight: 500;
}

.order-detail-value.is-amount
{
    font-family: var(--font-serif);
    font-size: 17px;
    color: var(--brand-darker);
    font-weight: 600;
}

.order-detail-value.is-danger { color: var(--danger); }
.order-detail-value.is-warning { color: #b08000; }
.order-detail-value.is-success { color: var(--success); }

/* ---------- Pay Transfer Info ---------- */
.order-pay-info
{
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--surface-warm);
    border: 1px dashed var(--brand-light);
    border-radius: 10px;
    font-size: 13px;
    color: var(--ink-light);
    line-height: 1.7;
}

.order-pay-info strong
{
    color: var(--ink);
    font-weight: 500;
}

.order-pay-info a
{
    color: var(--brand-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Empty State ---------- */
.order-empty
{
    padding: 60px 20px;
    text-align: center;
    background: var(--surface-card);
    border: 1px solid var(--brand-lighter);
    border-radius: 14px;
}

.order-empty-icon
{
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    color: var(--brand-light);
}

.order-empty-icon svg
{
    width: 100%;
    height: 100%;
}

.order-empty h3
{
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 500;
    color: var(--ink);
    margin: 0 0 8px 0;
}

.order-empty p
{
    font-size: 14px;
    color: var(--ink-muted);
    margin: 0 0 24px 0;
}

/* ---------- Pagination ---------- */
.order-pagination
{
    display: flex;
    justify-content: center;
    margin-top: 36px;
    gap: 6px;
    flex-wrap: wrap;
}

.order-pagination a,
.order-pagination span
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--ink);
    background: var(--surface-card);
    border: 1px solid var(--brand-lighter);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.order-pagination a:hover
{
    border-color: var(--brand-dark);
    color: var(--brand-dark);
}

.order-pagination .is-active
{
    background: var(--brand-dark);
    color: #ffffff;
    border-color: var(--brand-dark);
}

.order-pagination .is-disabled
{
    color: var(--ink-muted);
    background: var(--surface-warm);
    cursor: not-allowed;
}

/* ---------- Inquiry Card (guest_home) ---------- */
.order-inquiry-wrap
{
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 40px 16px;
}

.order-inquiry-card
{
    width: 100%;
    max-width: 480px;
    background: var(--surface-card);
    border: 1px solid var(--brand-lighter);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(180, 149, 144, 0.10);
}

.order-inquiry-head
{
    padding: 36px 32px 28px;
    text-align: center;
    background: linear-gradient(135deg, var(--brand-lighter) 0%, var(--surface-warm) 100%);
}

.order-inquiry-head .lm-eyebrow
{
    margin-bottom: 12px;
}

.order-inquiry-head h2
{
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 500;
    color: var(--ink);
    margin: 0 0 8px 0;
}

.order-inquiry-head p
{
    font-size: 13px;
    color: var(--ink-muted);
    margin: 0;
}

.order-inquiry-body
{
    padding: 32px;
}

.order-inquiry-body .lm-form-group
{
    margin-bottom: 18px;
}

.order-inquiry-body .lm-form-label
{
    display: block;
    font-size: 13px;
    color: var(--ink-light);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.order-inquiry-body .lm-input
{
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    background: var(--surface-card);
    border: 1px solid var(--brand-lighter);
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.order-inquiry-body .lm-input:focus
{
    outline: none;
    border-color: var(--brand-dark);
    box-shadow: 0 0 0 3px rgba(180, 149, 144, 0.15);
}

.order-inquiry-turnstile
{
    margin: 6px 0 22px;
    display: flex;
    justify-content: center;
}

@media (max-width: 540px)
{
    .order-inquiry-head
    {
        padding: 28px 24px 22px;
    }

    .order-inquiry-head h2
    {
        font-size: 22px;
    }

    .order-inquiry-body
    {
        padding: 24px;
    }
}

/* ---------- Modal Overrides for Order Details ---------- */
#details_modal .lm-modal-dialog
{
    max-width: 720px;
}

.order-modal-section
{
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--brand-lighter);
}

.order-modal-section:last-child
{
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.order-modal-section-title
{
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 500;
    color: var(--brand-darker);
    margin: 0 0 12px 0;
    letter-spacing: 0.02em;
}

.order-modal-info-grid
{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.order-modal-info-item
{
    padding: 10px 12px;
    background: var(--surface-warm);
    border-radius: 8px;
}

.order-modal-info-label
{
    display: block;
    font-size: 11px;
    color: var(--ink-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.order-modal-info-value
{
    font-size: 13px;
    color: var(--ink);
    font-weight: 500;
    word-break: break-word;
}

/* product table inside modal */
.order-modal-table
{
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.order-modal-table thead th
{
    padding: 10px 12px;
    background: var(--surface-warm);
    color: var(--ink-light);
    font-weight: 500;
    text-align: left;
    border-bottom: 1px solid var(--brand-lighter);
    letter-spacing: 0.05em;
    font-size: 12px;
    text-transform: uppercase;
}

.order-modal-table tbody td
{
    padding: 14px 12px;
    border-bottom: 1px solid var(--brand-lighter);
    color: var(--ink);
    vertical-align: top;
}

.order-modal-table tbody tr:last-child td
{
    border-bottom: none;
}

.order-modal-table .col-num
{
    text-align: right;
    white-space: nowrap;
}

.order-modal-table .col-name
{
    color: var(--ink);
    font-weight: 500;
}

.order-modal-table .col-spec
{
    color: var(--ink-muted);
    font-size: 12px;
}

@media (max-width: 640px)
{
    .order-modal-table thead
    {
        display: none;
    }

    .order-modal-table tbody td
    {
        display: block;
        padding: 6px 0;
        border-bottom: none;
    }

    .order-modal-table tbody tr
    {
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid var(--brand-lighter);
    }

    .order-modal-table .col-num
    {
        text-align: left;
    }

    .order-modal-table .col-num::before
    {
        content: attr(data-label);
        display: inline-block;
        min-width: 60px;
        color: var(--ink-muted);
        font-size: 12px;
    }
}

/* totals */
.order-modal-totals
{
    background: var(--surface-warm);
    border-radius: 10px;
    padding: 16px 20px;
}

.order-modal-total-row
{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: var(--ink-light);
}

.order-modal-total-row.is-final
{
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--brand-light);
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--brand-darker);
    font-weight: 600;
}

/* ---------- Card Mobile Stack ---------- */
@media (max-width: 540px)
{
    .order-card
    {
        padding: 18px;
    }

    .order-card-header
    {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-card-sn
    {
        font-size: 18px;
    }

    .order-detail-grid
    {
        grid-template-columns: 1fr;
    }
}

/* ---------- Footer link to home ---------- */
.order-empty-cta
{
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
