/* contact us Pop up form */

.popup {
  position: fixed;
  width: 400px;
  background: #fff;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.1);
  text-align: center;
  padding: 30px 30px 30px;
  color: #333;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  visibility: hidden;
  transition: transfrom 0.4s, top 0.4s;
}

.popup img {
  width: 100px;
  margin-top: -70px;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.popup h2 {
  font-size: 38px;
  font-weight: 500;
  margin: 30px 0 10px;
}

.popup button {
  width: 100%;
  text-align: center;
  background: #77c833;
  color: #fff;
  border: 0px;
  outline: none;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
}

.open-popup {
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* Ask Expert Popup Styling - Same as E-KYC */
#askExpertPopup {
  width: 500px;
}

/* Hide autofill icons */
#ask_expert_form input:-webkit-autofill~* {
  display: none !important;
}

#ask_expert_form input::-webkit-credentials-auto-fill-button {
  display: none !important;
}

/* Ask Expert Popup Styling End */

/* contact us End */

/* Portfolio button adjustments */
@media only screen and (max-width: 990px) {

  /* @media (min-width: 480px) {  */
  #loginBut {
    margin-left: 0px !important
  }

}

#popup-overlay {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.685);
  width: 100%;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 9998;
  display: block;
  overflow-y: hidden;
  overflow-x: hidden;
}


/* Video Galler */
.popup button:not(.btn) {
  width: 100%;
  text-align: center;
  background: #77c833;
  color: #fff;
  border: 0px;
  outline: none;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
}

/* Preserve Bootstrap `.btn` appearance inside popups but keep full-width */
.popup .btn {
  width: 100%;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
}

.play-button:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 25px solid white;
}

#fullscreen-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  overflow: hidden;
  z-index: 1033;
}

#fullscreen-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1034;
}

#close-button {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 30px;
  color: white;
  cursor: pointer;
  z-index: 1035;
}

/* KYC Popups */

.Err {
  color: #FF5733;
  padding: 0px !important;
}

#fullscreenBlack {
  visibility: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background: rgba(51, 51, 51, 0.7);
  z-index: 1100;
}

#kycRegister {
  width: 600px !important;
  z-index: 1101;

}

#kycStatus {
  width: 450px !important;
  z-index: 1101;
}

#askExpertPopup {
  width: 600px !important;
  z-index: 1101;
}

#create_iim_profile {
  width: 850px !important;
  z-index: 1101;
  overflow-y: auto;
}

#iin_profile_result_popup {
  width: 520px !important;
  z-index: 1101;
}

#kycRegisterContent,
#kycStatusContent,
#create_iim_profile_content,
#iin_profile_result_content {
  width: 100% !important;
  visibility: hidden;
}

#create_iim_profile Button {
  padding: 0px !important;
}

@media screen and (max-width: 620px) {

  #kycRegister,
  #askExpertPopup,
  #kycStatus,
  #iin_profile_result_popup {
    width: 90% !important;
  }
}


@media screen and (max-width: 900px) {
  #create_iim_profile {
    width: 90% !important;
    height: 90% !important;
  }

}

@media screen and (max-height: 768px) {
  #create_iim_profile {
    width: 90% !important;
    height: 90% !important;
  }
}


#butDoEkyc {
  margin-top: 0px;
}


#create_iim_profile label {
  font-size: 15px;
}

#create_iim_profile input,
#create_iim_profile select,
#create_iim_profile span,
#create_iim_profile a {
  height: 52px;
  font-size: 15px;
  padding-top: 22px;
  padding-bottom: 7px;
}

#create_iim_profile col-3,
#create_iim_profile col-6,
#create_iim_profile col-12 {
  margin-top: 10px;
}

#create_iim_profile button {
  margin-top: 5px;
  height: 50px;
  font-size: 16px;
  font-weight: 500;
}

#create_iim_profile div {
  text-align: left;
}

#create_iim_profile .jh .row {
  margin-top: 10px;
}

.jh {
  margin-top: 10px;
}


.banklist {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  max-height: 200px;
  overflow-y: auto;
  list-style-type: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.banklist li {
  padding: 8px 12px;
  cursor: pointer;
}

.banklist li.selected {
  background-color: #f2f2f2;
}

.iin_spinner {
  margin-top: 13px;
  color: #77c833;
}

.spinner_parent {
  display: flex;
  justify-content: center;
}


/* ===== Table Base ===== */
table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Inter", sans-serif;
  background: #fff;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ===== Funds Table Specific Styles ===== */
.funds {
  border-collapse: collapse !important;
  margin-left: auto;
  margin-right: auto;
  width: 100% !important;
  min-width: 800px;
}

.funds td,
.funds th {
  border: 1px solid #ddd !important;
  padding: 12px !important;
  text-align: left !important;
  word-wrap: break-word;
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Column widths for 5-column tables (NFO, TPF) */
#NFOTable th:nth-child(1),
#NFOTable td:nth-child(1),
#TPOTable th:nth-child(1),
#TPOTable td:nth-child(1) {
  width: 40%;
  min-width: 280px;
}

#NFOTable th:nth-child(2),
#NFOTable td:nth-child(2),
#TPOTable th:nth-child(2),
#TPOTable td:nth-child(2) {
  width: 15%;
  min-width: 100px;
}

#NFOTable th:nth-child(3),
#NFOTable td:nth-child(3),
#TPOTable th:nth-child(3),
#TPOTable td:nth-child(3) {
  width: 15%;
  min-width: 100px;
}

#NFOTable th:nth-child(4),
#NFOTable td:nth-child(4),
#TPOTable th:nth-child(4),
#TPOTable td:nth-child(4) {
  width: 15%;
  min-width: 120px;
}

#NFOTable th:nth-child(5),
#NFOTable td:nth-child(5),
#TPOTable th:nth-child(5),
#TPOTable td:nth-child(5) {
  width: 15%;
  min-width: 100px;
}

/* Column widths for 6-column table (Bonds) */
#BondsTable th:nth-child(1),
#BondsTable td:nth-child(1) {
  width: 35%;
  min-width: 250px;
}

#BondsTable th:nth-child(2),
#BondsTable td:nth-child(2) {
  width: 12%;
  min-width: 80px;
}

#BondsTable th:nth-child(3),
#BondsTable td:nth-child(3) {
  width: 12%;
  min-width: 80px;
}

#BondsTable th:nth-child(4),
#BondsTable td:nth-child(4) {
  width: 15%;
  min-width: 120px;
}

#BondsTable th:nth-child(5),
#BondsTable td:nth-child(5) {
  width: 13%;
  min-width: 100px;
}

#BondsTable th:nth-child(6),
#BondsTable td:nth-child(6) {
  width: 13%;
  min-width: 100px;
}

.funds tr:nth-child(even) {
  background-color: #f2f2f2 !important;
}

.funds tr:hover {
  background-color: #ddd !important;
}

.funds th {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
  text-align: left !important;
  background-color: #f9fafc !important;
  font-weight: 600 !important;
  white-space: nowrap;
}

.funds thead {
  display: table-header-group;
}

.funds tbody {
  display: table-row-group;
}

/* View More Button Styling */
.funds .desc-btn {
  display: inline-block;
  margin-left: 8px;
  padding: 5px 12px;
  background-color: #77c833;
  color: white;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.funds .desc-btn:hover {
  background-color: #5aa825;
  text-decoration: none;
  color: white;
}

/* Funds table container */
#tables-container {
  display: flex;
  justify-content: center;
  flex-direction: row;
  flex-wrap: wrap;
  padding-inline: 12px;
  gap: 3rem;
}

/* Mobile responsive */
@media (max-width: 768px) {

  .funds td,
  .funds th {
    padding: 8px !important;
    font-size: 12px;
  }

  .funds .desc-btn {
    display: block;
    margin-left: 0;
    margin-top: 8px;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 540px) {
  .funds {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
  }
}

/* ===== Table Wrapper and Layout Styles ===== */
.tables-wrapper,
.funds-tables-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tables-row,
.funds-tables-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Table Item Container */
.table-item,
.funds-table-item {
  display: flex;
  flex-direction: column;
}

/* Table Scroll Wrapper - Only table scrolls, not heading */
.table-scroll-wrapper {
  overflow-x: auto;
  position: relative;
}

/* Laptop view - Side by side with 50-50 width */
@media (min-width: 992px) {

  .tables-row:not(.bonds-full-width) .table-item,
  .funds-tables-row .funds-table-item {
    flex: 0 0 calc(50% - 1rem);
    /* 50% width minus half of gap */
    max-width: calc(50% - 1rem);
    min-width: 0;
  }

  .tables-row.bonds-full-width .table-item {
    flex: 1 1 100%;
  }
}

/* Tablet and Mobile view - Stack all tables */
@media (max-width: 991px) {

  .tables-row,
  .funds-tables-row {
    flex-direction: column;
  }

  .table-item,
  .funds-table-item {
    width: 100%;
  }
}

.table-item.full-width {
  width: 100%;
}

/* Custom Scrollbar Styling for Table Scroll Wrapper */
.table-scroll-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-scroll-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb {
  background: #77c833;
  border-radius: 10px;
  transition: background 0.3s ease;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: #5aa825;
}

/* Firefox Scrollbar */
.table-scroll-wrapper {
  scrollbar-width: thin;
  scrollbar-color: #77c833 #f1f1f1;
}

th {
  background: #f4f4f4;
  font-weight: 600;
  color: #333;
  padding: 10px 12px;
  text-align: left;
}

td {
  padding: 10px 12px;
  border-top: 1px solid #eee;
}

tr:hover {
  background: #fafafa;
}

tr[data-description] {
  position: relative;
  cursor: pointer;

}


.desc-btn {
  display: inline-block;
  color: #007bff;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  margin-left: 4px;
}


/* ===== Mobile Dialog ===== */
@media (max-width: 768px) {
  tr[data-description]:hover::after {
    display: none;
    /* disable tooltip on mobile */
  }
}

/* Modern Card Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-card {
  background: #fff;
  width: 90%;
  max-width: 420px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: scaleIn 0.3s ease-in-out;
}

.modal-card h3 {
  font-size: 1.50rem;
  font-weight: 600;
  color: #111827;
  text-align: center;
  margin-top: -15px;
}


.modal-card p {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.5;
  word-wrap: break-word;
  /* legacy support */
  overflow-wrap: break-word;
  /* modern browsers */
  white-space: pre-wrap;
  /* preserve line breaks and wrap long text */
}


.modal-card .btn-invest {
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.modal-card .close-btn {
  background: transparent;
  border: none;
  color: #6b7280;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-end;
  font-size: 1rem;
}


.tooltip-cell::after {

  content: attr(data-description);
  position: absolute;
  left: 0;
  top: 100%;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  width: 300px;
  z-index: 20;
  transform: translateY(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  display: none;
  /* hide by default */
}

/* Show tooltip on hover */
.tooltip-cell:hover::after {
  display: block;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}