﻿@media (max-width: 768px) {
    .modal-lg {
        max-width: 95%;
    }

    .table-responsive {
        overflow-x: auto;
    }

    table thead {
        display: none;
    }

    table tbody td {
        display: block;
        width: 100%;
        text-align: left;
        padding: 0.75rem 0.5rem;
        border: none;
        border-bottom: 1px solid #f1f1f1;
    }

        table tbody td::before {
            content: attr(data-label);
            font-weight: bold;
            display: block;
            color: darkslategray;
        }

    .selectCustomer {
        width: 100%;
    }
    .txt-bold {
        color: #005858;
        font-weight: bold;
    }

    .video-container {
        position: relative;
        width: 295px;
        height: 412px;
        margin: 0 auto;
        overflow: hidden;
        border-radius: 8px;
    }

        .video-container video,
        .video-container img {
            position: absolute;
            top: 10px;
            left: 0;
            width: 295px;
            height: 360px;
            object-fit: cover;
            border-radius: 8px;
        }

    #frameOverlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 90%;
        pointer-events: none; /* ทำให้ผู้ใช้คลิกผ่าน overlay ได้ */
        z-index: 2;
    }
    @keyframes pulse {
        0% {
            transform: scale(1);
            opacity: 1;
        }

        50% {
            transform: scale(1.2);
            opacity: 0.7;
        }

        100% {
            transform: scale(1);
            opacity: 1;
        }
    }
}

/* 🌐 Desktop (width ≥ 769px) */
@media (min-width: 769px) {
    .modal-lg {
        max-width: 900px;
    }

    .table-responsive {
        overflow-x: visible;
    }

    table thead {
        display: table-header-group;
    }

    table tbody td {
        display: table-cell;
        text-align: center;
        padding: 0.75rem;
        border: 1px solid #ddd;
    }

        table tbody td::before {
            content: none; /* ซ่อน label ที่ใช้ใน mobile */
        }

    .selectCustomer {
        width: auto;
    }

    .txt-bold {
        color: #003f3f;
        font-weight: bold;
    }

    .video-container {
        position: relative;
        width: 420px;
        height: 580px;
        margin: 0 auto;
        overflow: hidden;
        border-radius: 12px;
    }

        .video-container video,
        .video-container img {
            position: absolute;
            top: 10px;
            left: 0;
            width: 420px;
            height: 530px;
            object-fit: cover;
            border-radius: 12px;
        }

    #frameOverlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 90%;
        pointer-events: none;
        z-index: 2;
    }

    @keyframes pulse {
        0% {
            transform: scale(1);
            opacity: 1;
        }

        50% {
            transform: scale(1.15);
            opacity: 0.8;
        }

        100% {
            transform: scale(1);
            opacity: 1;
        }
    }
}

/* 📱 Mobile (width ≤ 768px) */
@media (max-width: 768px) {
    .modal-lg {
        max-width: 95%;
    }

    .table-responsive {
        overflow-x: auto;
    }

    table thead {
        display: none;
    }

    table tbody td {
        display: block;
        width: 100%;
        text-align: left;
        padding: 0.75rem 0.5rem;
        border: none;
        border-bottom: 1px solid #f1f1f1;
    }

        table tbody td::before {
            content: attr(data-label);
            font-weight: bold;
            display: block;
            color: darkslategray;
        }

    .selectCustomer {
        width: 100%;
    }

    .txt-bold {
        color: #005858;
        font-weight: bold;
    }

    .video-container {
        position: relative;
        width: 295px;
        height: 412px;
        margin: 0 auto;
        overflow: hidden;
        border-radius: 8px;
    }

        .video-container video,
        .video-container img {
            position: absolute;
            top: 10px;
            left: 0;
            width: 295px;
            height: 360px;
            object-fit: cover;
            border-radius: 8px;
        }

    #frameOverlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 90%;
        pointer-events: none;
        z-index: 2;
    }

    @keyframes pulse {
        0% {
            transform: scale(1);
            opacity: 1;
        }

        50% {
            transform: scale(1.2);
            opacity: 0.7;
        }

        100% {
            transform: scale(1);
            opacity: 1;
        }
    }
}

.blink-warning {
    animation: blinkFade 1.6s infinite;
}

@keyframes blinkFade {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }

    100% {
        opacity: 1;
    }
}

</style >