/* ========================================================= */
/* --- BASE & WRAPPER STYLING --- */
/* ========================================================= */
body {
  font-family: Helvetica, sans-serif;
  scroll-behavior: smooth; 
}

.contmsme {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    padding: 25px 10px 25px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 25px;
    text-align: center;
}

/* ========================================================= */
/* --- TABLE RESPONSIVE (NO DESKTOP SCROLL) --- */
/* ========================================================= */
.table-responsive {
    width: 100%;
    position: relative;
    margin-bottom: 20px;
    /* Desktop par overflow hata diya hai taaki scroll na aaye aur data khud fit ho */
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* Columns ko text ke hisaab se adjust hone dega */
}

table td {
    padding: 10px 8px; /* Thodi compact padding taaki fit ho sake */
    font-size: 13px; 
    color: #333;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    word-break: break-word; /* Lamba text hoga toh khud neeche wali line me aayega */
}

.myfinTableMoreS table th {
    background-color: #f4f7f9;
    color: #1a202c;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    padding: 12px 8px;
    text-align: left;
    cursor: pointer;
    border-bottom: 2px solid #e2e8f0;
    vertical-align: middle;
}

.myfinTableMoreS table th:hover {
    background-color: #e2e8f0;
}

.myfinTableMoreS table th .sort-icon {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    margin-left: 4px;
    vertical-align: middle;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.myfinTableMoreS table th:hover .sort-icon {
    opacity: 1;
}

table th.asc .sort-icon {
    border-bottom: 5px solid #007bff;
    opacity: 1;
}

table th.desc .sort-icon {
    border-top: 5px solid #007bff;
    opacity: 1;
}

table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}

table tbody tr:hover {
    background-color: #f5f5f5;
}

/* ========================================================= */
/* --- BADGE ALIGNMENT (LIKE IMAGE) --- */
/* ========================================================= */

.company-name-wrapper {
  /* Flex ki jagah inline kiya, jisse badge text ka hissa ban jaye */
  display: inline; 
  line-height: 1.5;
}

.company-name-wrapper a {
  text-decoration: underline;
  color: inherit;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;  /* Image 074658 ki tarah thoda chota size */
  height: 22px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2); 
  cursor: pointer; 
  
  /* Text ki seedh me rakhne ke liye */
  vertical-align: middle; 
  margin-left: 5px; 
  margin-top: -2px; 
}

.badge-upcoming { background-color: #ffc107; color: #000; } 
.badge-open { background-color: #157347; } 
.badge-ct { background-color: #fd7e14; } 
.badge-ap { background-color: #dc3545; } 
.badge-al { background-color: #6f42c1; } 
.badge-lt { background-color: #0dcaf0; color: #000; } 

/* ========================================================= */
/* --- CUSTOM BADGE POPUP / TOOLTIP --- */
/* ========================================================= */
.custom-badge-tooltip {
  position: absolute;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  width: max-content;
  max-width: 260px;
  font-family: Helvetica, sans-serif;
  color: #333;
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none; 
}

.custom-badge-tooltip.show-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto; 
}

.tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background-color: #f5f6f8;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 8px 8px 0 0;
  font-weight: bold;
  font-size: 14px;
}

.tooltip-close {
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: #666;
  transition: color 0.2s;
  padding-left: 10px;
}

.tooltip-close:hover {
  color: #000;
}

.tooltip-body {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #555;
  word-wrap: break-word;
}

.custom-badge-tooltip::before {
  content: "";
  position: absolute;
  top: 15px;
  left: -7px;
  border-width: 7px 7px 7px 0;
  border-style: solid;
  border-color: transparent #e0e0e0 transparent transparent;
}

.custom-badge-tooltip::after {
  content: "";
  position: absolute;
  top: 16px;
  left: -5px;
  border-width: 6px 6px 6px 0;
  border-style: solid;
  border-color: transparent #fff transparent transparent;
}

.custom-badge-tooltip.arrow-right::before {
  left: auto;
  right: -7px;
  border-width: 7px 0 7px 7px;
  border-color: transparent transparent transparent #e0e0e0;
}
.custom-badge-tooltip.arrow-right::after {
  left: auto;
  right: -5px;
  border-width: 6px 0 6px 6px;
  border-color: transparent transparent transparent #fff;
}

/* ========================================================= */
/* --- MOBILE SPECIFIC FIXES --- */
/* ========================================================= */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none;
    }
    .table-responsive {
        overflow-x: auto; /* Mobile par table wide hoti hai, toh scroll zaroori hai */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }
    .contmsme {
        width: 100%;
        padding: 25px 5px;
    }
    table td {
        padding: 10px 8px;
        font-size: 12px; 
    }
    .hide-on-mobile {
        display: none;
    }
}