﻿/* =========================
   PAYMENT PAGE
========================= */

.payment-page {
    padding: 24px 0 50px;
}

.payment-title {
    font-size: 3rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 22px;
}

/* ซ่อน Mobile Layout บนคอมเสมอ */
.payment-mobile,
.payment-mobile-search {
    display: none !important;
}

/* SEARCH */

.payment-search-form {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

    .payment-search-form input {
        height: 54px;
        border-radius: 14px;
        border: 1px solid #d1d5db;
        padding: 0 18px;
        flex: 1;
        font-size: 1rem;
    }

    .payment-search-form button {
        height: 54px;
        border-radius: 14px;
        border: none;
        background: #111827;
        color: white;
        font-weight: 800;
        padding: 0 26px;
    }

/* PRICE CARD */

.price-card {
    background: white;
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 26px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

    .price-card h2 {
        font-size: 1.8rem;
        font-weight: 800;
        margin-bottom: 18px;
        color: #111827;
    }

.price-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

    .price-grid > div {
        min-width: 0;
    }

    .price-grid label {
        font-weight: 700;
        margin-bottom: 7px;
        color: #111827;
    }

    .price-grid input,
    .price-grid button {
        width: 100%;
    }

    .price-grid input {
        height: 52px;
        border-radius: 14px;
        border: 1px solid #d1d5db;
        padding: 0 16px;
        font-size: 1rem;
    }

.payment-btn-dark {
    height: 52px;
    border-radius: 14px;
    border: none;
    background: #1f2937;
    color: white;
    font-weight: 800;
    padding: 0 24px;
}

/* CALCULATE ALL */

.calculate-all-btn {
    width: 100%;
    height: 56px;
    border-radius: 16px;
    background: #111827;
    color: white;
    border: none;
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 28px;
}

/* TABLE */

.payment-table-wrap {
    background: white;
    border-radius: 24px;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 28px rgba(0,0,0,.07);
}

.payment-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1250px;
}

    .payment-table thead th {
        background: #050505;
        color: white;
        padding: 18px 16px;
        font-weight: 800;
        white-space: nowrap;
        font-size: 1rem;
    }

        .payment-table thead th:first-child {
            border-top-left-radius: 20px;
        }

        .payment-table thead th:last-child {
            border-top-right-radius: 20px;
        }

    .payment-table tbody td {
        padding: 18px 16px;
        border-bottom: 1px solid #e5e7eb;
        vertical-align: middle;
        font-weight: 700;
        color: #111827;
    }

    .payment-table tbody tr:hover {
        background: #f9fafb;
    }

/* BADGES */

.payment-badge-game {
    background: #2563eb;
    color: white;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: .85rem;
    font-weight: 800;
    display: inline-block;
}

.payment-badge-wait {
    background: #fbbf24;
    color: #111827;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: .85rem;
    font-weight: 800;
    display: inline-block;
}

.payment-badge-money {
    background: #e11d48;
    color: white;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: .85rem;
    font-weight: 800;
    display: inline-block;
}

/* TIME + BUTTONS */

.payment-time-control {
    display: flex;
    gap: 10px;
    align-items: center;
}

    .payment-time-control input,
    .payment-time-control select {
        width: 115px;
        height: 50px;
        border-radius: 14px;
        border: 1px solid #d1d5db;
        padding: 0 14px;
        font-size: 1rem;
    }

.payment-row-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

    .payment-row-actions button,
    .btn-calc,
    .btn-paid,
    .btn-toggle-paid {
        height: 50px;
        border-radius: 14px;
        border: none;
        padding: 0 18px;
        font-weight: 800;
        white-space: nowrap;
    }

.btn-calc {
    background: #1f2937;
    color: white;
}

.btn-paid {
    background: #059669;
    color: white;
}

.btn-toggle-paid {
    background: #1f2937;
    color: white;
}

/* TABLET */

@media (max-width: 1200px) {
    .payment-title {
        font-size: 2.5rem;
    }

    .price-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .payment-table {
        min-width: 1100px;
    }
}

/* MOBILE */

@media (max-width: 768px) {
    .payment-page {
        padding: 14px 0 32px;
    }

    .payment-title {
        font-size: 2.1rem;
        margin-bottom: 18px;
    }

    .payment-search-form,
    .payment-table-wrap {
        display: none !important;
    }

    .payment-mobile-search {
        display: block !important;
        padding: 0 10px 16px;
    }

        .payment-mobile-search input {
            width: 100%;
            height: 48px;
            border: none;
            border-radius: 16px;
            background: white;
            padding: 0 16px;
            font-size: .95rem;
            font-weight: 500;
            box-shadow: 0 4px 12px rgba(0,0,0,.07);
            outline: none;
        }

    .price-card {
        display: block;
        padding: 18px;
        border-radius: 20px;
        margin-bottom: 20px;
    }

        .price-card h2 {
            font-size: 1.4rem;
            margin-bottom: 15px;
        }

    .price-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

        .price-grid input {
            height: 48px;
            font-size: 1rem;
        }

    .payment-btn-dark {
        width: 100%;
        height: 50px;
        margin-top: 10px;
    }

    .calculate-all-btn {
        display: block;
        height: 50px;
        margin-bottom: 20px;
    }

    .payment-mobile {
        display: block !important;
        padding: 0 10px 32px;
    }

    .payment-card {
        background: white;
        border-radius: 22px;
        padding: 24px 26px;
        margin-bottom: 18px;
        box-shadow: 0 6px 18px rgba(0,0,0,.07);
        border: 1px solid #f1f5f9;
    }

    .payment-mobile-name {
        font-size: 1.55rem;
        font-weight: 900;
        color: #111827;
        margin-bottom: 18px;
    }

    .payment-mobile-line {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 1.1rem;
        color: #111827;
        margin-bottom: 10px;
    }

        .payment-mobile-line span {
            width: 28px;
            text-align: center;
            font-size: 1.15rem;
        }

        .payment-mobile-line b {
            font-weight: 500;
        }

    .payment-mobile-admin {
        margin-top: 18px;
    }

    .payment-mobile-time {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 12px;
    }

        .payment-mobile-time select {
            height: 46px;
            border-radius: 14px;
            font-size: 1rem;
            font-weight: 500;
            padding: 0 14px;
        }

    .payment-mobile-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

        .payment-mobile-buttons button {
            height: 50px;
            border-radius: 16px;
            font-size: 1rem;
            font-weight: 700;
        }

    .mobile-paid-badge {
        border-radius: 10px;
        padding: 7px 12px;
        font-size: .95rem;
        font-weight: 700;
    }
}
