/* ---------- khung ---------- */
.vbc-card {
    margin: 16px 0 28px;
}

.vbc-title {
    font-weight: 700;
    font-size: 26px;
    text-transform: uppercase;
    text-align: center;
    margin: 0 0 14px;
    color: #133985;
}

/* vỏ bảng */
.vbc-board {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(2, 35, 90, .12);
}

/* header */
.vbc-grid-head {
    display: grid;
    grid-template-columns: 1.05fr 1.4fr 1.4fr;
    background: linear-gradient(90deg, #1e5fbf, #0e3f9c);
    color: #fff;
    text-align: center;
}

.vbc-headcell {
    padding: 14px 10px 12px;
    font-weight: 700;
    border-right: 1px solid rgba(255, 255, 255, .15);
}

.vbc-headcell:last-child {
    border-right: 0;
}

.vbc-headcell small {
    display: block;
    font-weight: 500;
    opacity: .9;
    margin-top: 2px;
}

/* body rows (mỗi hàng là 1 grid riêng để dễ zebra) */
.vbc-row {
    display: grid;
    grid-template-columns: 1.05fr 1.4fr 1.4fr;
    background: #fff;
}

.vbc-row:nth-of-type(even) {
    background: #f6f7fb;
}

.vbc-cell {
    padding: 12px 14px;
    border-top: 1px solid #e9edf4;
    border-right: 1px solid #eef2f7;
	text-align: center;
}

.vbc-cell:last-child {
    border-right: 0;
}

.vbc-cell--cat {
    font-weight: 600;
}

/* chú thích */
.vbc-footnote {
    font-size: 16px;
    opacity: .7;
    margin: 0px 16px 8px 0px;
	text-align: right;
}

/* ---------- responsive: mobile 1 cột ---------- */
@media (max-width: 640px) {
    .vbc-grid-head {
        display: none;
    }

    .vbc-row {
        grid-template-columns: 1fr;
        background: #fff;
        margin-bottom: 10px;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 4px 14px rgba(2, 35, 90, .08);
    }

    .vbc-cell {
        display: grid;
        grid-template-columns: 0.95fr 1.05fr;
        border-right: 0;
		text-align: right;
    }

    .vbc-cell--cat {
        grid-template-columns: 1fr;
        background: #f3f6fb;
        font-weight: 700;
		text-align: left;
    }

    /* hiện nhãn bằng data-label của ô */
    .vbc-cell:not(.vbc-cell--cat)::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: .5rem;
		text-align: left;
    }
}

/* ============================================================
   VISA BULLETIN COMPARE TABLE — OVERLAY mode
   ============================================================ */

/* Wrapper */
.vbc-cmp-wrap {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 20px 0 30px;
  max-width: 900px;
}

/* ── CARD: toàn bộ là ảnh nền, content đè lên ── */
.vbc-cmp-card {
  position: relative;
  width: 100%;
  /* Giữ tỉ lệ ảnh: 3530 × 1656 */
  aspect-ratio: 3530 / 1656;
  background-image: url('../images/download.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* ── HEADER: vùng logo + tiêu đề ── */
.vbc-ov-header {
  position: absolute;
  top:  5%;     /* ảnh mẫp trên white card ≈ 5% */
  left: 3.5%;
  right: 3.5%;
  height: 18%;  /* header chiếm tới 23% */
  display: flex;
  gap: 2%;
}

.vbc-ov-logo {
  flex: 0 0 auto;
  line-height: 0;
}

.vbc-ov-logo svg {
  width: clamp(80px, 12%, 160px);
  height: auto;
}

.vbc-ov-title {
  flex: 1;
  font-size: clamp(13px, 2.2vw, 26px);
  font-weight: 700;
  text-transform: uppercase;
  color: #002080;
  letter-spacing: .5px;
  line-height: 1.15;
  text-align: center;
}

.vbc-ov-month {
  color: #e30613;
}

/* ── TABLE WRAP: bắt đầu từ dưới header (≈ blue bar bắt đầu ợ15% ảnh) ── */
.vbc-ov-table-wrap {
  position: absolute;
  top:  24%;   /* ~24% = vị trí blue bar trong ảnh */
  left: 4%;
  right: 4%;
  height: 68%; /* kết thúc tại 92% */
}

/* ── TABLE: hoàn toàn trong suốt ── */
.vbc-ov-table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

/* Tất cả cell: transparent, không border */
.vbc-ov-th,
.vbc-ov-td {
  background: transparent;
  border: none;
  text-align: center;
  vertical-align: middle;
  line-height: 1.2;
  overflow: hidden;
}

/* Header text — trắng vì nền ảnh màu xanh đậm */
.vbc-ov-th {
  color: #fff;
  font-weight: 700;
  font-size: clamp(7px, 0.85vw, 10px);
  padding: 0 1px;
}

.vbc-ov-th--cat {
  font-size: clamp(8px, 1.2vw, 13px);
}

.vbc-ov-th--group {
  font-size: clamp(9px, 1.3vw, 14px);
  font-weight: 800;
}

/* Thead 1 hàng ≈ blue bar: 16% của table-wrap */
.vbc-ov-tr--head { height: 16%; }
/* Mỗi data row: 15% x 5 = 75% + thead 16% = 91% */
.vbc-ov-tr--data { height: 15%; }

/* Data text — đậm vì nền ảnh trắng */
.vbc-ov-td {
  color: #111;
  font-size: clamp(7px, 0.9vw, 11px);
  padding: 0 2px;
}

.vbc-ov-td--cat {
  font-weight: 800;
  color: #002080;
  font-size: clamp(8px, 1vw, 12px);
}

.vbc-ov-td--diff {
  font-weight: 700;
}

/* Màu tăng/giảm */
.vbc-up { color: #006622; }
.vbc-dn { color: #bb0000; }
.vbc-eq { color: #333; }

/* Alternating rows trong overlay table (giống ảnh 1) */
.vbc-ov-tr--odd  { background: rgba(255,255,255,0); }
.vbc-ov-tr--even { background: rgba(215,230,255,0.35); }

/* Cột phân cách dọc giữa nhóm Lịch mở và Lịch PV */
.vbc-ov-td--sep,
.vbc-ov-th--sep {
  background: rgba(0,0,0,0) !important;
  padding: 0 !important;
  width: 1px;
}

/* Ô "Current (Hiện tại)": in nghiêng, màu xanh đậm */
.vbc-ov-td.vbc-cur {
  font-style: italic;
  color: #003087;
  font-weight: 600;
}

/* Ô "Đến lượt xử lý": màu cam */
.vbc-pending {
  color: #c55000;
  font-weight: 700;
}

/* ── FOOTER ── */
.vbc-ov-footer {
  position: absolute;
  bottom: 3%;
  left: 4%;
  right: 4%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: clamp(8px, 0.9vw, 11px);
  color: #444;
}

/* ── Nút tải hình ── */
.vbc-cmp-actions {
  margin-top: 16px;
  text-align: center;
}

.vbc-cmp-download-btn {
  display: inline-block;
  padding: 12px 36px;
  background: #1a75d2;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, transform .15s;
  box-shadow: 0 4px 14px rgba(26,75,160,.35);
}

.vbc-cmp-download-btn:hover  { background: #1358a8; transform: translateY(-1px); }
.vbc-cmp-download-btn:active { transform: translateY(0); }
.vbc-cmp-download-btn:disabled { background: #7fa8d8; cursor: wait; }



/* Inner = thẻ trắng nổi bên trong */
.vbc-cmp-inner {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,20,60,.18);
}

/* Header (trong .vbc-cmp-inner) */
.vbc-cmp-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px 10px;
  background: #fff;
  border-bottom: 2px solid #e0e8f0;
}

.vbc-cmp-logo {
  flex: 0 0 auto;
}

.vbc-cmp-title {
  flex: 1;
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
  color: #003087;
  letter-spacing: .5px;
  text-align: center;
}

.vbc-cmp-month {
  color: #e30613;
}

/* Table wrapper */
.vbc-cmp-table-wrap {
  padding: 0 0 4px;
  overflow-x: auto;
}

/* Table */
.vbc-cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

/* Header cells */
.vbc-cmp-th {
  background: #1a4fa0;
  color: #fff;
  font-weight: 700;
  padding: 9px 8px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.2);
  line-height: 1.3;
}

.vbc-cmp-th--cat {
  width: 60px;
  background: #0e3680;
}

.vbc-cmp-th--group {
  background: #1a4fa0;
  font-size: 13px;
  font-weight: 800;
}

.vbc-cmp-th--sub {
  background: #1c57b8;
  font-size: 12px;
  font-weight: 600;
}

.vbc-cmp-th--wait {
  background: #0e3680;
  width: 100px;
}

/* Body rows */
.vbc-cmp-row {
  background: #fff;
}

.vbc-cmp-row:nth-child(even) {
  background: #f4f7fc;
}

.vbc-cmp-row:hover {
  background: #edf1fb;
}

/* Body cells */
.vbc-cmp-td {
  padding: 10px 8px;
  text-align: center;
  border: 1px solid #d4daea;
  font-size: 13px;
  color: #1a1a2e;
  white-space: nowrap;
}

.vbc-cmp-td--cat {
  font-weight: 800;
  font-size: 14px;
  color: #003087;
  background: #f0f4ff;
}

.vbc-cmp-td--diff {
  font-weight: 700;
  white-space: nowrap;
}

/* Màu tăng/giảm */
.vbc-up { color: #0a7d2e; }
.vbc-dn { color: #c0000c; }
.vbc-eq { color: #555; }

.vbc-cmp-td--wait {
  font-weight: 600;
  color: #444;
}

/* Footer card */
.vbc-cmp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 10px;
  font-size: 11px;
  color: #555;
  background: #e0e8f5;
}

/* Nút tải hình */
.vbc-cmp-actions {
  margin-top: 18px;
  text-align: center;
}

.vbc-cmp-download-btn {
  display: inline-block;
  padding: 12px 36px;
  background: #1a75d2;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, transform .15s;
  box-shadow: 0 4px 14px rgba(26,75,160,.35);
}

.vbc-cmp-download-btn:hover {
  background: #1358a8;
  transform: translateY(-1px);
}

.vbc-cmp-download-btn:active {
  transform: translateY(0);
}

.vbc-cmp-download-btn:disabled {
  background: #7fa8d8;
  cursor: wait;
}

/* Responsive mobile */
@media (max-width: 700px) {
  .vbc-cmp-title { font-size: 15px; }
  .vbc-cmp-th, .vbc-cmp-td { font-size: 11px; padding: 7px 4px; }
  .vbc-cmp-logo svg { width: 80px; height: 32px; }
}