/*
 * மொபைல் பொது ஸ்டைல் (எல்லா பக்கங்களுக்கும்) - pwa_head.php மூலம் include ஆகும்.
 * டெஸ்க்டாப் லேஅவுட் மாறாது; 768px-க்கு கீழே மட்டும் விதிகள் பொருந்தும்.
 */
html { -webkit-text-size-adjust: 100%; }
img, video { max-width: 100%; }

/* டேபிள்களை இதற்குள் வைத்தால் மொபைலில் பக்கவாட்டில் scroll ஆகும் (பக்கம் overflow ஆகாது) */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table-scroll > table { min-width: 100%; }

/* சேமித்த பிறகு காட்டும் toast (index.php) */
#sstToast { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 99990; background: #1b5e20; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 16px; font-weight: bold; box-shadow: 0 6px 20px rgba(0,0,0,0.3); max-width: calc(100vw - 32px); box-sizing: border-box; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; animation: sstToastIn .3s ease-out; }
#sstToast.warn { background: #e65100; }
#sstToast a, #sstToast button { background: #fff; color: #1b5e20; border: none; border-radius: 6px; padding: 8px 12px; font-weight: bold; text-decoration: none; font-size: 15px; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; }
#sstToast .sst-close { background: transparent; color: #fff; padding: 4px 8px; font-size: 18px; min-height: 0; }
@keyframes sstToastIn { from { opacity: 0; transform: translate(-50%, -20px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 768px) {
    body { padding: 10px !important; }
    /* தொடும் அளவு (min 44px), iOS-ல் zoom ஆகாமல் இருக்க 16px எழுத்து */
    input:not([type=checkbox]):not([type=radio]), select, textarea { min-height: 44px; font-size: 16px; }
    button, .btn, .btn-status, .wa-btn, .whatsapp-btn, .act-btn, .big-btn, .add-btn, .save-btn, .update-btn, .btn-update, .cp-btn { min-height: 44px; font-size: 16px; max-width: 100%; box-sizing: border-box; }
    a.btn, a.wa-btn, a.whatsapp-btn, a.btn-status { display: inline-flex; align-items: center; justify-content: center; }
    .table-scroll > table { min-width: 560px; }
    .table-scroll table th, .table-scroll table td { white-space: nowrap; }
    /* மேலே இருக்கும் "தலைப்பு + பட்டன்" flex வரிசைகள் மொபைலில் அடுக்கும் */
    .header-section, .filter-box, .filter-section, .status-bar { flex-wrap: wrap; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
}
@media print { #sstToast { display: none !important; } }
