/* =========================================
   Urdu Markets Econ Calendar – Plain Table
   ========================================= */

/* ============================
   Tabs Styling (Top of Calendar)
   ============================ */
.um-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  background: #083055;
  padding: 10px;
  border-radius: 0px;
  margin-bottom: 0px;
}

.um-tabs button {
  background: transparent;
  color: #dbe9ff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.um-tabs button.active {
  background: #0066d6;
  color: #fff;
}

.um-tabs button:hover {
  background: #0051a8;
  color: #fff;
}

/* Header bar + logo section (if you keep it separately) */
/* ============================
   Header Title + Logo Bar
   ============================ */
.um-header {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #083055;
  padding: 15px;
  position: relative;
  border-radius: 6px 6px 0 0;
}
.um-calendar-title {
  color: #fff !important;
  font-size: 20px;
  font-weight: 600;
  margin: 0 auto;
  text-align: center;
}

.um-calendar-logo {
  position: absolute;
  right: 15px;
  top: 25%;
  transform: translateY(-25%);
  max-height: 40px;
  width: auto;
}

/* Tabs (if used) */
.um-tabs {
  display: flex;
  flex-wrap: wrap;
  background: #083055;
  gap: 6px;
  padding: 8px;
  justify-content: flex-start;
  position: relative;
  z-index: 1;
}
.um-tabs button {
  background: transparent;
  color: #dbe9ff;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.um-tabs button.active {
  background: #0066d6;
  color: #fff;
}

/* Scroll wrapper */
.um-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* Remove unwanted gap between tabs and table */
.um-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 0;     /* ✅ removes gap */
  padding-top: 0;    /* ✅ extra safety */
}

/* Base table */
.um-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1000px;    /* force horizontal scroll on small screens */
  direction: rtl;
  font-family: 'Noto Nastaliq Urdu', serif;
  table-layout: auto;
}

/* Cells */
.um-table th,
.um-table td {
  font-size: 13px;
  padding: 6px 8px;
  font-weight: 400;
  text-align: right;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

/* Header row — dark blue + white, NOT sticky */
.um-table thead th {
  background: #083055 !important;
  color: #fff !important;
  font-weight: 600;
  position: static !important;  /* Critical: scrolls with table */
  top: auto !important;
  z-index: auto !important;
}

/* Links */
.um-table td a {
  color: #0066d6;
  text-decoration: underline;
}

/* Event column limit to avoid over-expansion */
.um-table th:nth-child(5),
.um-table td:nth-child(5) {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile: tighter */
@media (max-width: 768px) {
  .um-table {
    min-width: 900px;
  }
  .um-table th,
  .um-table td {
    font-size: 12px;
    padding: 5px 6px;
  }
}

/* =========================
   Calendar Preload Handling
   ========================= */
#um-cal-container {
  opacity: 0;
  transition: opacity 0.2s ease-in;
}

#um-cal-container.ready {
  opacity: 1;
}