﻿
.product-selection-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

    .product-selection-card:hover {
        border-color: #0d6efd;
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(13, 110, 253, 0.1);
    }

.btn-check:checked + .product-selection-card {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

.check-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #0d6efd;
    display: none;
}

.btn-check:checked + .product-selection-card .check-badge {
    display: block;
}

.product-icon {
    width: 50px;
    height: 50px;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d6efd;
}


/* เอฟเฟกต์ตอนชี้ */
.selection-neo-medium:hover {
    border-color: #0d6efd;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.08);
}

/* ขนาดไอคอนกำลังดี */
.selection-neo-medium i {
    font-size: 1.8rem; /* ไม่ใหญ่เท่าตัวแรก ไม่จิ๋วเท่าตัวสอง */
    color: #adb5bd;
    margin-bottom: 10px;
}

.selection-neo-medium.active i {
    color: #0d6efd;
}

/* หัวข้อตัวหนังสือ */
.selection-neo-medium .title {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
}

/* การ์ดปกติ (เส้นบางๆ สีเทาอ่อน) */
.selection-neo-medium {
    cursor: pointer;
    background: #ffffff;
    border: 2px solid #f0f2f5; /* เส้นขอบปกติ */
    border-radius: 16px;
    padding: 20px 10px;
    transition: all 0.2s ease-in-out;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative; /* เพื่อให้ใส่ไอคอนที่มุมได้ */
}

    /* --- จุดสำคัญ: ตอนเลือก (Active) --- */
    .selection-neo-medium.active {
        border: 3px solid #0d6efd !important; /* เพิ่มความหนาเป็น 3px และเปลี่ยนสี */
        background-color: #f0f7ff;
        box-shadow: 0 0 15px rgba(13, 110, 253, 0.2); /* เพิ่มแสงฟุ้งๆ รอบกรอบให้ดูเด่น */
    }

    /* แถม: เพิ่มเครื่องหมายถูกเล็กๆ ที่มุมขวาบนของกรอบ */
    .selection-neo-medium::after {
        content: '\f058'; /* FontAwesome check-circle */
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        top: 5px;
        right: 8px;
        color: #0d6efd;
        font-size: 1.2rem;
        opacity: 0; /* ซ่อนไว้ก่อน */
        transition: opacity 0.2s;
    }

    .selection-neo-medium.active::after {
        opacity: 1; /* โชว์ตอนเลือก */
    }
/* การ์ดสรุปข้อมูลผู้ป่วย */
.patient-result-card {
    background: #ffffff;
    border: none;
    border-left: 5px solid #0d6efd; /* เส้นขอบหนาด้านซ้ายเพื่อความเด่น */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 1.25rem;
    transition: all 0.3s ease;
}

/* หัวข้อเล็กๆ */
.info-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

/* ข้อมูล HN และ ชื่อ */
.info-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
}

/* ไอคอน */
.patient-icon {
    width: 45px;
    height: 45px;
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-success-gradient {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.bg-primary-gradient {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
}

.appointment-ticket {
    border-radius: 30px;
    overflow: hidden;
}

.ticket-body {
    border-bottom: 2px dashed #f0f0f0;
}

.info-label {
    font-size: 0.75rem;
    color: #8898aa;
    text-transform: uppercase;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #32325d;
}

.appointment-box {
    background-color: #f6f9fc;
    border: 1px solid #e6eef5;
}

.icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ticket-edge-left, .ticket-edge-right {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #f8f9fa; 
    border-radius: 50%;
    top: -10px;
}

.ticket-edge-left {
    left: -10px;
}

.ticket-edge-right {
    right: -10px;
}

.bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media print {
    .ticket-footer, .btn, nav, footer {
        display: none !important;
    }

    .container {
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .appointment-ticket {
        box-shadow: none !important;
        border: 1px solid #eee;
    }

    body {
        background: white !important;
    }
}

/* 1. สไตล์ปุ่มตัวเลือก (Soft Card) */
.btn-soft-select {
    background-color: #ffffff !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid #f0f2f5 !important;
}

    .btn-soft-select:hover {
        background-color: #f8fbff !important;
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05) !important;
        border-color: #0d6efd !important;
    }

/* 2. วงกลมไอคอนด้านซ้าย */
.icon-circle-bg {
    width: 45px;
    height: 45px;
    background-color: #eef5ff;
    color: #0d6efd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* 3. ปรับแต่งขอบมนของ SweetAlert */
.rounded-5 {
    border-radius: 2rem !important;
}

.rounded-4 {
    border-radius: 1rem !important;
}

/* 4. แก้ระยะห่างตัวอักษรให้ดูโปร่งๆ */
.text-primary {
    color: #32325d !important; /* สีน้ำเงินเข้มแบบหรูๆ */
}

/* ไอคอนวงกลมสีเขียวซอฟต์ๆ สำหรับเวลา */
.icon-circle-bg-time {
    width: 45px;
    height: 45px;
    background-color: #e8f7ef;
    color: #198754;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* ปรับสีปุ่มย้อนกลับให้ดูเป็น Link นวลๆ */
.swal2-cancel.btn-link {
    text-decoration: none !important;
    font-size: 0.9rem;
}