/* ============================================================
   주문 목록 페이지 스타일
   ============================================================ */

/* 기간 필터 바 */


/* 직접 날짜 입력 */


.period-date-input input[type="date"]:focus {
    outline: none;
    border-color: var(--color-primary, #029846);
}

.period-date-separator {
    font-size: 13px;
    color: var(--color-text-light, #6b7280);
}

#applyDateBtn {
    flex-shrink: 0;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--color-primary, #029846);
    border-radius: 6px;
    background: #fff;
    color: var(--color-primary, #029846);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

#applyDateBtn:hover {
    background: var(--color-primary, #029846);
    color: #fff;
}

/* ============================================================
   상태 탭
   ============================================================ */


/* ============================================================
   주문 카드
   ============================================================ */


.order-card:hover {
    border-color: var(--color-border, #d1d5db);
}

.order-card:focus {
    outline: 2px solid var(--color-primary, #029846);
    outline-offset: 2px;
}

/* 카드 헤더 */
.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border-light, #e5e7eb);
}

.order-card-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-no {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text, #111827);
}

.order-date {
    font-size: 12px;
    color: var(--color-text-light, #6b7280);
}

/* 상태 배지 */
.order-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}


/* 카드 본문 (상품 정보) */
.order-card-body {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}


.order-product-info {
    flex: 1;
    min-width: 0;
}


.order-product-option {
    display: block;
    font-size: 12px;
    color: var(--color-text-light, #6b7280);
    margin-bottom: 4px;
}

.order-product-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text, #111827);
    margin-bottom: 4px;
}

.order-extra-count {
    display: inline-block;
    font-size: 12px;
    color: var(--color-text-light, #6b7280);
    background: var(--color-bg-light, #f3f4f6);
    padding: 2px 8px;
    border-radius: 10px;
}

/* 카드 푸터 */
.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--color-border-light, #e5e7eb);
}

.order-total {
    font-size: 14px;
    color: var(--color-text-light, #6b7280);
}


.order-detail-link {
    font-size: 13px;
    color: var(--color-primary, #029846);
    font-weight: 500;
}

/* ============================================================
   빈 상태 / 로딩 / 에러 상태
   ============================================================ */

.orders-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
    color: var(--color-text-light, #6b7280);
    font-size: 14px;
    text-align: center;
}

.orders-empty svg {
    color: var(--color-border, #d1d5db);
}

.orders-empty p {
    margin: 0;
}

.orders-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-light, #6b7280);
    font-size: 14px;
}

/* 무한 스크롤 로딩 */

/* 로딩 스피너 */


/* ============================================================
   모바일 반응형
   ============================================================ */


/* 주문내역: 기간 버튼은 첫 줄, 날짜 직접 입력은 둘째 줄 (휴대폰 폭에서 날짜칸이 눌리지 않게) */
.orders-page .period-filter-bar,
.period-filter-bar:has(.period-date-input) {
    flex-wrap: wrap;
    overflow: visible;
}

.period-date-input {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    flex-wrap: nowrap;
}

.period-date-input input[type="date"] {
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--color-border, #d1d5db);
    border-radius: 6px;
    font-size: 13px;
    color: var(--color-text, #111827);
    background: #fff;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}


.order-card {
    background: #fff;
    border: 1px solid var(--color-border-light, #e5e7eb);
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.order-thumb {
    border-radius: 8px;
    object-fit: cover;
    background: var(--color-bg-light, #f9fafb);
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}

.order-product-name {
    font-weight: 500;
    color: var(--color-text, #111827);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.order-total strong {
    font-weight: 700;
    color: var(--color-text, #111827);
    font-size: 15px;
}
