/* assets/app.css - สไตล์เสริมของระบบ (ทับบนธีม Printnow) */

/* dropdown เมนูผู้ใช้บน header */
.user-dropdown { position: relative; }
.user-dropdown .user-icon { cursor: pointer; }
.user-dropdown .dropdown-menu { z-index: 1050; min-width: 200px; }
.user-dropdown .dropdown-item { padding: 8px 16px; font-size: 15px; }

/* flash message */
.app-flash { padding: 14px 18px; border-radius: 8px; margin-bottom: 10px; font-size: 15px; }
.app-flash-success { background: #e6f6ec; color: #1c7a3f; border: 1px solid #b7e2c6; }
.app-flash-error   { background: #fde8e8; color: #a12626; border: 1px solid #f3c4c4; }
.app-flash-info    { background: #e7f0fd; color: #1c4fa1; border: 1px solid #c3d8f5; }
.app-flash-warning { background: #fdf3e0; color: #94631a; border: 1px solid #f0dcb4; }

/* form validation box */
.app-alert-error {
    background: #fde8e8; color: #a12626; border: 1px solid #f3c4c4;
    padding: 12px 16px; border-radius: 8px; margin-bottom: 20px;
}

/* สรุปคำสั่งซื้อ */
.order-summary-table { width: 100%; border-collapse: collapse; }
.order-summary-table th, .order-summary-table td {
    padding: 12px 8px; border-bottom: 1px solid #eef1f5; text-align: left; vertical-align: top;
}
.order-summary-table th { width: 150px; color: #666; font-weight: 500; }
.order-summary-table .price { font-weight: 700; font-size: 18px; }

/* ตัวเลือกวิธีจ่ายเงิน */
.pay-method-option {
    display: flex; align-items: center; gap: 12px; padding: 16px 18px;
    border: 2px solid #e6e9ef; border-radius: 10px; margin-bottom: 12px; cursor: pointer;
    transition: border-color .2s, background .2s;
}
.pay-method-option:hover { border-color: #c7d0dd; }
.pay-method-option input { width: 20px; height: 20px; }
.pay-method-option .pm-label { font-weight: 600; font-size: 16px; }
.pay-method-option .pm-desc { font-size: 13px; color: #7a828f; }

/* iframe จ่ายเงิน */
.pay-frame-wrap { width: 100%; }
.pay-frame {
    width: 100%; min-height: 640px; border: 1px solid #e6e9ef; border-radius: 10px; background: #fff;
}

/* กล่องผลลัพธ์ */
.result-wrap { text-align: center; padding: 20px 0; }
.result-icon {
    width: 90px; height: 90px; line-height: 90px; border-radius: 50%;
    font-size: 46px; color: #fff; margin: 0 auto 18px;
}
.result-icon.success { background: #22a35a; }
.result-icon.fail { background: #d94a4a; }
.code-box {
    background: #f6f8fb; border: 2px dashed var(--theme, #f60); border-radius: 12px;
    padding: 22px; margin: 22px auto; max-width: 420px;
}
.code-box .code-label { font-size: 13px; color: #7a828f; letter-spacing: 1px; }
.code-box .code-value {
    font-size: 26px; font-weight: 800; letter-spacing: 2px; color: #1f2a44; word-break: break-all;
}

/* ตารางประวัติ */
.orders-table { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; }
.orders-table th, .orders-table td {
    padding: 14px 12px; border-bottom: 1px solid #eef1f5; text-align: left; white-space: nowrap;
}
.orders-table thead th { background: #f6f8fb; color: #333; }
.code-inline { background: #f1f5ff; color: #1c4fa1; padding: 3px 10px; border-radius: 5px; font-family: monospace; }

.badge-status { padding: 5px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.badge-pending { background: #fdf3e0; color: #94631a; }
.badge-paid { background: #e6f6ec; color: #1c7a3f; }
.badge-failed { background: #fde8e8; color: #a12626; }

/* การ์ดฟอร์ม signin ปรับให้ label/ปุ่มดูดีบนธีม */
.signin-item .app-btn { border: none; cursor: pointer; }

/* ปุ่ม outline: พื้นขาว ขอบม่วง (ใช้กับ "ชำระเงินอีกครั้ง" ในหน้าประวัติ) */
.theme-btn.btn-outline-theme {
    background-color: #fff;
    color: #7000fe;
    border: 2px solid #7000fe;
}
.theme-btn.btn-outline-theme:hover {
    background-color: #7000fe;
    color: #fff;
}
.theme-btn.btn-outline-theme::before,
.theme-btn.btn-outline-theme::after {
    background-color: #7000fe;   /* effect ตอน hover ของธีมให้เป็นสีม่วง */
}

/* Autocomplete ช่องโรงเรียน (checkout) */
.school-suggest {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    margin: 2px 0 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
    max-height: 260px;
    overflow-y: auto;
}
.school-suggest-item {
    padding: 9px 14px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}
.school-suggest-item:hover,
.school-suggest-item.active {
    background: #f2ecff;
    color: #7000fe;
}

/* ข้อมูลผู้สมัคร (checkout): ให้ input กับ select สูง/แพดดิ้งเท่ากันทุกช่อง */
.applicant-card .form-control {
    height: 50px;
    padding: 8px 14px;
    line-height: 1.4;
    font-size: 15px;
}
.applicant-card select.form-control {
    -webkit-appearance: menulist;   /* คงลูกศร dropdown ของ select */
    appearance: menulist;
}
