/* Wrapper */
.responsive-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* Inner scroll area */
.ts-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: block;
}

/* FIX: Force table greater than screen width */
/* Desktop (ปกติ) — ไม่ปรับอะไรเลย */
.ts-inner table {
    width: 100%;
    max-width: 100%;
    table-layout: auto;
}

/* Mobile (เฉพาะจอแคบ ≤ 1024px) */
@media (max-width: 1024px) {
    .ts-inner table {
        display: inline-table !important;
        width: auto !important;
        max-width: none !important;
        white-space: nowrap !important;
        table-layout: auto !important;
    }
}

/* Scroll Buttons */
.ts-btn {
    position: absolute;
    top: 45%;
    z-index: 20;
    border: none;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 16px;
    transition: 0.2s;
    background: var(--ts-btn-bg);
    color: var(--ts-btn-icon);
}

.ts-left { left: 5px; }
.ts-right { right: 5px; }

.ts-btn:hover {
    background: var(--ts-btn-hover);
}

/* Hint */
.ts-hint {
    position: absolute;
    right: 10px;
    top: -2px;
    font-size: 13px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    padding: 3px 10px;
    border-radius: 10px;
    opacity: 0;
    animation: hintfade 3s ease-out 0.5s forwards;
    z-index: 5;
}

@keyframes hintfade {
    0% { opacity: 1; }
    100% { opacity: 0; }
}
