/**
 * v7/point/history.css - 포인트 내역 페이지 전용 CSS
 *
 * v7 디자인 표준(point-guideline.css)을 기반으로 작성.
 * Web Awesome Pro + 커스텀 CSS 사용. Bootstrap 미사용.
 * 보더리스 디자인 — 영역 구분은 연한 배경색으로.
 *
 * @see v7/point/history.php
 * @see v7/help/point-guideline.css (표준 레퍼런스)
 */

/* ─────────────────────────────────────────
   로그인 필요 / 접근 권한 없음 화면
   ───────────────────────────────────────── */
.point-login-required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    padding: 2rem;
}

.point-login-box {
    text-align: center;
    max-width: 400px;
}

.point-login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--wa-color-brand-95, #e7f5ff);
    color: var(--wa-color-brand-50, #3178c0);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.point-login-icon--danger {
    background: #fef2f2;
    color: #dc2626;
}

.point-login-box h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.3rem;
    color: var(--wa-color-neutral-10, #1e293b);
}

.point-login-box p {
    font-size: 0.875rem;
    color: var(--wa-color-neutral-60, #64748b);
    margin: 0 0 1.25rem;
}

/* ─────────────────────────────────────────
   페이지 컨테이너
   ───────────────────────────────────────── */
.point-history-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 0;
}

/* ─────────────────────────────────────────
   페이지 헤더 — 표준 pg-header
   ───────────────────────────────────────── */
.pg-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.pg-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--wa-color-brand-95, #e7f5ff);
    color: var(--wa-color-brand-50, #3178c0);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.pg-header-text h1 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    color: var(--wa-color-neutral-10, #1e293b);
}

.pg-header-text p {
    font-size: 0.82rem;
    color: var(--wa-color-neutral-60, #64748b);
    margin: 0.15rem 0 0;
}

/* ─────────────────────────────────────────
   wa-callout 스타일
   ───────────────────────────────────────── */
.point-history-page wa-callout {
    font-size: 0.85rem;
}

.point-history-page wa-callout strong {
    color: var(--wa-color-brand-50, #3178c0);
}

.point-history-page wa-callout a {
    color: var(--wa-color-brand-50, #3178c0);
    text-decoration: none;
    font-weight: 500;
}

.point-history-page wa-callout a:hover {
    text-decoration: underline;
}

/* ─────────────────────────────────────────
   빈 상태
   ───────────────────────────────────────── */
.pg-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: #f8fafc;
    border-radius: 12px;
    color: var(--wa-color-neutral-60, #94a3b8);
}

.pg-empty-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.pg-empty-state p {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
}

/* ─────────────────────────────────────────
   테이블 — 보더리스 디자인 (표준 pg-table)
   ───────────────────────────────────────── */
.pg-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.pg-table thead tr {
    background: #f8fafc;
}

.pg-table th {
    padding: 0.7rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--wa-color-neutral-60, #64748b);
    border: none;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pg-table td {
    padding: 0.65rem 1rem;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.pg-table tbody tr:hover {
    background: #f8fafc;
}

.pg-table tbody tr:nth-child(even) {
    background: #fcfcfd;
}

.pg-table tbody tr:nth-child(even):hover {
    background: #f8fafc;
}

/* 포인트/숫자 컬럼 — 가운데 정렬 */
.pg-col-point {
    text-align: center;
    width: 15%;
    min-width: 90px;
}

/* ─────────────────────────────────────────
   테이블 셀 — 커스텀 스타일
   ───────────────────────────────────────── */

/* 사유 셀 */
.point-reason-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* 사유 라벨 — 순수 텍스트 (wa-badge 대신 span 사용으로 shadow DOM 이슈 제거) */
.point-reason-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--wa-color-neutral-20, #1e293b);
}

.point-reason-label.point-reason-warning {
    color: #92400e;
}

.point-reason-label.point-reason-danger {
    color: #b91c1c;
}

.point-reason-label.point-reason-neutral {
    color: var(--wa-color-neutral-50, #475569);
}

.point-view-link {
    font-size: 0.8rem;
    color: var(--wa-color-brand-50, #3178c0);
    text-decoration: none;
    font-weight: 500;
}

.point-view-link:hover {
    text-decoration: underline;
}

/* 적용 포인트 */
.point-amount-cell {
    white-space: nowrap;
    font-weight: 600;
}

.point-positive {
    color: #16a34a;
}

.point-negative {
    color: #dc2626;
}

.point-zero {
    color: var(--wa-color-neutral-60, #94a3b8);
}

/* 적용 후 포인트 */
.point-after-cell {
    white-space: nowrap;
}

/* 날짜/시간 */
.point-date-cell {
    white-space: nowrap;
    color: var(--wa-color-neutral-60, #64748b);
    font-size: 0.85rem;
}

.point-date-short {
    display: none;
}

.point-date-full {
    display: inline;
}

/* ─────────────────────────────────────────
   페이지네이션
   ───────────────────────────────────────── */
.pg-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
}

.pg-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    color: var(--wa-color-neutral-40, #334155);
    background: #f8fafc;
    transition: background 0.15s, color 0.15s;
}

.pg-page-link:hover {
    background: var(--wa-color-brand-95, #e7f5ff);
    color: var(--wa-color-brand-50, #3178c0);
}

.pg-page-link.active {
    background: var(--wa-color-brand-50, #3178c0);
    color: white;
    font-weight: 600;
}

/* ─────────────────────────────────────────
   전체 건수 표시
   ───────────────────────────────────────── */
.pg-total-info {
    text-align: center;
    font-size: 0.8rem;
    color: var(--wa-color-neutral-60, #94a3b8);
}

/* ─────────────────────────────────────────
   반응형: 모바일 (<992px)
   ───────────────────────────────────────── */
@media (max-width: 991.98px) {
    .point-history-page {
        padding: 1rem 0.75rem;
        gap: 1.25rem;
    }

    .pg-header-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .pg-header-text h1 {
        font-size: 1.05rem;
    }

    .point-date-full {
        display: none;
    }

    .point-date-short {
        display: inline;
    }

    .pg-table th,
    .pg-table td {
        padding: 0.5rem 0.65rem;
        font-size: 0.8rem;
    }

    .pg-col-point {
        min-width: 70px;
    }

    .point-login-icon {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
}
