/* ============================================
   MOC Trade Summary Widget — mts-* prefix
   Layout: 2-panel (left info+buttons | right 3 data cols)
   ============================================ */

/* --- Widget Container --- */
.mts-widget {
    font-family: 'DBHelvethaicaX', sans-serif;
    background: #becddc;
    border-radius: 16px;
    padding: 16px;
}

/* --- 2-panel layout --- */
.mts-layout {
    display: flex;
    gap: 24px;
    align-items: stretch;
}

/* --- LEFT PANEL --- */
.mts-left {
    flex: 0 0 35%;
    width: 35%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mts-title {
    color: #0B284E;
    font-size: 36px;
    font-weight: bold;
    line-height: 1.2;
    margin: 0;
    font-family: 'DBHelvethaicaX', sans-serif;
}
.mts-title2 {
    color: #0B284E;
    font-size: 28px;
    line-height: 1.2;
    margin: 0;
    font-family: 'DBHelvethaicaX', sans-serif;
}
.mts-period {
    color: #555;
    font-size: 22px;
    margin: 0;
    font-family: 'DBHelvethaicaX', sans-serif;
}
.mts-left-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}
.mts-left-btns .mts-custbtn {
    flex: 1 1 auto;
    min-width: 0;
}

/* --- RIGHT PANEL: 3 data cols --- */
.mts-right {
    flex: 1 1 0;
    display: flex;
    gap: 16px;
}
.mts-col {
    flex: 1;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    padding: 18px 16px;
    display: grid;
    grid-template-rows: auto auto auto auto auto auto auto;
    gap: 0;
    align-content: start;
    align-items: center;
    justify-items: center;
}
.mts-col-title {
    font-size: 26px;
    font-weight: bold;
    color: #0B284E;
    text-align: center;
    margin: 0 0 8px;
    font-family: 'DBHelvethaicaX', sans-serif;
    justify-self: stretch;
    width: 100%;
}
.mts-divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 8px 0;
    width: 100%;
    justify-self: stretch;
    align-self: center;
}
.mts-divider-mid {
    border-top-color: #ccc !important;
}
.mts-val-block {
    text-align: center;
    padding: 6px 0;
    width: 100%;
}
.mts-value {
    font-family: Tahoma, sans-serif;
    font-size: 24px;
    font-weight: bold;
    color: #000;
    line-height: 1.2;
}
.mts-unit {
    font-size: 17px;
    color: #000;
    margin: 3px 0;
    font-family: 'DBHelvethaicaX', sans-serif;
}
.mts-flag {
    font-size: 26px;
    line-height: 1;
    margin-top: 2px;
}

/* --- Balance column --- */
.mts-balance-label {
    font-family: 'DBHelvethaicaX', sans-serif;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    margin-top: 2px;
    min-height: 1.5em;
    width: 100%;
    line-height: 1.5;
}

/* --- Colors --- */
.mts-text-green  { color: #1e5602; }
.mts-text-red    { color: #990000; }
.mts-text-export { color: #000; }
.mts-text-import { color: #000; }

/* --- Column divider colors --- */
.mts-col-export .mts-divider  { border-top-color: #990000; }
.mts-col-import .mts-divider  { border-top-color: #198754; }
.mts-col-balance .mts-divider { border-top-color: #fecb00; }

/* --- Column title colors --- */
.mts-col-export .mts-col-title  { color: #000; }
.mts-col-import .mts-col-title  { color: #000; }
.mts-col-balance .mts-col-title { color: #000; }

/* --- Flag image --- */
.mts-flag-img {
    display: inline-block;
    width: 40px;
    height: 26px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    vertical-align: middle;
}

/* --- Base Button --- */
.mts-btn {
    display: inline-block;
    padding: 7px 20px;
    font-family: 'DBHelvethaicaX', sans-serif;
    font-size: 24px;
    text-decoration: none;
    border-radius: 30px;
    transition: opacity 0.2s;
    text-align: center;
    white-space: nowrap;
    color: #fff;
}
.mts-btn:hover { opacity: 0.82; text-decoration: none; color: inherit; }

/* ปุ่มชมทั้งหมด — พอดข้อความ ชิดซ้าย */
.mts-btn-viewall { background: #0B284E; color: #fff; align-self: flex-start; }

/* ปุ่ม custom (default: navy ถ้าไม่ได้กำหนด .mts-custbtn-N ใน Custom CSS) */
.mts-custbtn { background: #1a6fc4; color: #fff; }

/* --- Color Reference (กำหนดสีใน Custom CSS เช่น .mts-custbtn-1 { background: #1a6fc4; color: #fff; } ) --- */
/* Solid */
.mts-custbtn-blue-solid    { background: #1a6fc4; color: #fff; }
.mts-custbtn-purple-solid  { background: #6f42c1; color: #fff; }
.mts-custbtn-orange-solid  { background: #fd7e14; color: #fff; }
.mts-custbtn-green-solid   { background: #198754; color: #fff; }
.mts-custbtn-teal-solid    { background: #0d9488; color: #fff; }
.mts-custbtn-red-solid     { background: #dc3545; color: #fff; }
.mts-custbtn-gold-solid    { background: #fecb00; color: #0a1c57; }
.mts-custbtn-gray-solid    { background: #6c757d; color: #fff; }
.mts-custbtn-navy-solid    { background: #0B284E; color: #fff; }

/* --- Button Variants: Gradient (9 colors) --- */
.mts-custbtn-blue-gradient    { background: linear-gradient(135deg, #1a6fc4, #0d9f8f); color: #fff; }
.mts-custbtn-purple-gradient  { background: linear-gradient(135deg, #6f42c1, #c2559a); color: #fff; }
.mts-custbtn-orange-gradient  { background: linear-gradient(135deg, #fd7e14, #fecb00); color: #fff; }
.mts-custbtn-green-gradient   { background: linear-gradient(135deg, #198754, #0d9488); color: #fff; }
.mts-custbtn-teal-gradient    { background: linear-gradient(135deg, #0d9488, #198754); color: #fff; }
.mts-custbtn-red-gradient     { background: linear-gradient(135deg, #dc3545, #c2559a); color: #fff; }
.mts-custbtn-gold-gradient    { background: linear-gradient(135deg, #fecb00, #fd7e14); color: #0a1c57; }
.mts-custbtn-gray-gradient    { background: linear-gradient(135deg, #6c757d, #495057); color: #fff; }
.mts-custbtn-navy-gradient    { background: linear-gradient(135deg, #0B284E, #1a6fc4); color: #fff; }

/* --- Responsive: tablet/mobile --- */
@media only screen and (max-width: 900px) {
    .mts-layout {
        flex-direction: column;
    }
    .mts-left {
        flex: none;
    }
    .mts-left-btns {
        flex-direction: row;
    }
    .mts-right {
        flex-direction: column;
    }
    .mts-col {
        width: 100%;
    }
    .mts-title  { font-size: 28px; }
    .mts-title2 { font-size: 22px; }
    .mts-period { font-size: 18px; }
}

@media only screen and (max-width: 600px) {
    .mts-value    { font-size: 20px; }
    .mts-col-title { font-size: 22px; }
    .mts-btn      { font-size: 20px; padding: 5px 14px; }
}

