/*cards*/

.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100% !important;
  max-width: 100% !important;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.card-text-style {
  font-size: 16px;
  font-weight: 500;
  color: black;
}

.custom-card {
  overflow: hidden;
  width: 100% !important;
}

.custom-calendar-btn {
  color: #e97727;
  border: 1px solid #e97727;
  display: block;
  margin: 0 auto;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  padding: 4px 8px;
  width: fit-content;
  max-width: 90%;
}

.custom-calendar-btn:hover {
  color: white;
  background-color: #e97727;
}

.card-date {
  font-size: 12px;
  color: #000000;
}

.custom-countdown-box {
  background-color: #e3ebfa;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid #eee;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.countdown-item {
  min-width: 45px;
  flex: 1;
  max-width: none;
}

.countdown-number {
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}

.countdown-label {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-countdown-box .countdown-number,
.custom-countdown-box .countdown-label {
  color: #1458ce;
}

/* Base container styling */
.meeting-container {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 10px 10px 0 0;
  width: fit-content;
  position: relative;
}

/* Section modifiers */
.live {
  background-color: #f8dcdc;
}
.upcoming {
  background-color: #c9d2e4;
}
.previous {
  background-color: #d1d1d1;
}

/* Live Dot */
.meeting-dot {
  height: 10px;
  width: 10px;
  background-color: red;
  border-radius: 50%;
  margin-right: 6px;
  animation: livePulse 1.5s ease-in-out infinite;
  position: relative;
}

.meeting-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 2px solid red;
  animation: livePulseRing 1.5s ease-in-out infinite;
}

@keyframes livePulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes livePulseRing {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

/* Shared text styling */
.meeting-text {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  display: flex;
  align-items: center;
}

/* Shared icon styling */
.meeting-icon {
  font-size: 12px;
  margin-left: 4px;
}

/* Line */
.meeting-line {
  height: 2px;
  width: 100%;
  margin-top: -1px;
}

.live-line {
  background-color: #f8dcdc;
}
.upcoming-line {
  background-color: #c9d2e4;
}
.previous-line {
  background-color: #d1d1d1;
}

/* ok and close button styling */
.jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons,
.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons {
  display: none;
}

/* the text in the issue info */
.issue-info {
  font-size: 10px !important;
}

/*button styles */
.custom-btn {
  display: var(--btn-display);
  padding: var(--btn-padding);
  justify-content: var(--btn-justify-content);
  align-items: var(--btn-align-items);
  gap: var(--btn-gap);
  align-self: var(--btn-align-self);
  border-radius: var(--btn-border-radius);
  color: black;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}

/* Only background differs */
.btn-orng {
  background: var(--btn-bg-orng);
}

.btn-gray {
  background: var(--btn-bg-gray);
}

.btn-join-meeting {
  border-radius: 0px 0px 6px 6px;
  background: var(--btn-join-meeting-bg);
  color: white;
  font-size: 14px;
}

.btn-explore {
  border-radius: 0px 0px 6px 6px;
  background: var(--btn-explore-bg);
  color: #747474;
  font-size: 14px;
}

@media (max-width: 768px) {
  .custom-calendar-btn {
    width: fit-content;
    max-width: 80%;
    margin: 0 auto;
    display: block;
    padding: 2px 4px;
    font-size: 10px;
  }

  .card {
    width: 100% !important;
    max-width: 100% !important;
  }

  .custom-card {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Countdown timer mobile responsiveness */
  .custom-countdown-box {
    padding: 0.3rem 0.5rem;
  }
  
  .countdown-item {
    min-width: 30px;
    max-width: none;
    flex: 1 1 auto;
  }
  
  .countdown-number {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
  }
  
  .countdown-label {
    font-size: 8px;
    letter-spacing: 0.5px;
    margin-top: 2px;
  }

  /* Make carousel banner full width on mobile */
  .carousel {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
  }

  .carousel-inner {
    width: 100% !important;
  }

  .carousel-item img {
    width: 100% !important;
    object-fit: cover !important;
    height: 250px !important; /* Adjust height as needed */
  }
}

/* Extra small mobile screens */
@media (max-width: 480px) {
  .countdown-item {
    min-width: 25px;
    flex: 1 1 auto;
  }
  
  .countdown-number {
    font-size: 12px;
    font-weight: 700;
  }
  
  .countdown-label {
    font-size: 7px;
    letter-spacing: 0.3px;
  }
  
  .custom-countdown-box {
    padding: 0.25rem 0.4rem;
  }
}

/* Advanced Search Styles */
.search-container {
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  border: 1px solid #ddd;
  border-radius: 8px 0 0 8px;
  padding: 12px 16px;
  font-size: 14px;
  box-shadow: none;
}

.search-input:focus {
  border-color: #f29200;
  box-shadow: 0 0 0 0.2rem rgba(242, 146, 0, 0.25);
}

.search-btn {
  background-color: #333;
  color: white;
  border: 1px solid #333;
  border-radius: 0;
  padding: 12px 20px;
}

.search-btn:hover {
  background-color: #555;
  border-color: #555;
  color: white;
}

.filter-toggle-btn {
  background-color: #f8f9fa;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
}

.filter-toggle-btn:hover {
  background-color: #e9ecef;
  color: #333;
}

.advanced-search-panel {
  margin: 20px auto 0;
  overflow: hidden;
}

.advanced-search-panel .card {
  border-radius: 12px;
  transform: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: none;
}

.advanced-search-panel .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  border-radius: 12px 12px 0 0;
  padding: 16px 20px;
}

.advanced-search-panel .card-body {
  padding: 24px;
}

.filter-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  text-align: left;
}

.form-check {
  margin-bottom: 8px;
}

.form-check-input:checked {
  background-color: #f29200;
  border-color: #f29200;
}

.form-check-input:focus {
  box-shadow: none;
  outline: none;
}

.form-check-label {
  font-size: 14px;
  color: #666;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.form-check-label .form-check-input {
  margin-right: 8px;
  margin-left: 0;
}

.form-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
  margin-bottom: 6px;
  text-align: left !important;
  display: block;
}

.form-control {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
}

.form-control:focus {
  border-color: #f29200;
  box-shadow: 0 0 0 0.2rem rgba(242, 146, 0, 0.25);
}

.advanced-search-btn {
  background-color: #f29200;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.advanced-search-btn:hover {
  background-color: #f29200;
  color: white;
}

.btn-close {
  padding: 8px;
  margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .search-container {
    margin: 0 16px;
  }

  .advanced-search-panel {
    margin: 20px 16px 0;
  }

  .advanced-search-panel .card-body {
    padding: 16px;
  }

  .filter-title {
    font-size: 14px;
    margin-bottom: 12px;
    text-align: left;
  }
}

/* Modern Date Picker Styles */
.date-input-wrapper {
  position: relative;
}

.date-input-wrapper .date-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  pointer-events: none;
  font-size: 14px;
}

.modern-datepicker {
  cursor: pointer;
  padding-right: 35px !important;
}

.modern-datepicker:focus {
  border-color: #f29200;
  box-shadow: 0 0 0 0.2rem rgba(242, 146, 0, 0.25);
}

/* Custom Flatpickr theme overrides */
.flatpickr-calendar {
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
  border: none !important;
}

.flatpickr-months {
  background: #f8f9fa !important;
  border-radius: 12px 12px 0 0 !important;
}

.flatpickr-month {
  color: #f29200 !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
  fill: #f29200 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: #f8f9fa !important;
  color: #f29200 !important;
  border: none !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months option {
  color: #f29200 !important;
  background: #f8f9fa !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months option:hover {
  background: #f8f9fa !important;
  background: #f29200 !important;
}

.flatpickr-current-month input.cur-year {
  background: #f8f9fa !important;
  color: #f29200 !important;
}

.flatpickr-weekdays {
  background: #f8f9fa !important;
}

.flatpickr-weekday {
  color: #666 !important;
  font-weight: 600 !important;
}

.flatpickr-day:hover {
  background: rgba(242, 146, 0, 0.1) !important;
  border-color: #f29200 !important;
}

.flatpickr-day.selected {
  background: #f29200 !important;
  border-color: #f29200 !important;
}

.flatpickr-day.today {
  border-color: #f29200 !important;
}

.flatpickr-day.today:hover {
  background: #f29200 !important;
  color: white !important;
}

/* Fade animation for search results */
.search-fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

.search-fade-out {
    animation: fadeOut 0.25s ease-in-out;
    opacity: 0.7;
}

/* Prevent initial flicker on page load */
#live-section, #upcoming-section {
    transition: opacity 0.2s ease-in-out;
}

/* Ensure meeting containers render smoothly */
#live-meetings-container, #upcoming-meetings-container, #companies-container {
    min-height: 0;
    transition: opacity 0.25s ease-in-out;
}

/* Smooth loading state */
.search-loading {
    opacity: 0.6;
    transition: opacity 0.25s ease-in-out;
    position: relative;
}

/* Add subtle loading overlay */
.search-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1;
    border-radius: 8px;
}

.search-loading::after {
    content: 'Searching...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0.7;
        transform: translateY(-3px);
    }
}

/* Card stagger animation for multiple cards */
.search-results .col-6:nth-child(1) { animation-delay: 0.1s; }
.search-results .col-6:nth-child(2) { animation-delay: 0.2s; }
.search-results .col-6:nth-child(3) { animation-delay: 0.3s; }
.search-results .col-6:nth-child(4) { animation-delay: 0.4s; }
.search-results .col-6:nth-child(5) { animation-delay: 0.5s; }
.search-results .col-6:nth-child(6) { animation-delay: 0.6s; }

/* Loading animation - more subtle */
.search-loading {
    opacity: 0.6;
    transition: opacity 0.25s ease-in-out;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0.6;
    }
}

/* Live meeting indicator styles */
.live-indicator {
    display: inline-flex;
    align-items: center;
    color: #dc3545;
    font-weight: bold;
    animation: livePulse 2s infinite;
}

.live-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #dc3545;
    border-radius: 50%;
    margin-right: 5px;
    animation: blink 1s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Filter toggle button styles */
.filter-toggle-btn {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
    transition: all 0.3s ease;
}

.filter-toggle-btn:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: white;
}

.filter-toggle-btn.active {
    background-color: #E54930;
    border-color: #E54930;
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(229, 73, 48, 0.25);
}

.filter-toggle-btn.active:hover {
    background-color: #c73e1d;
    border-color: #b8381a;
    color: white;
}

/* Meeting title styles */
.card-title-style {
    font-size: 0.85rem;
    line-height: 1.3;
    color: #6c757d !important;
    font-style: italic;
    max-height: 2.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Carousel center overlay logo (scoped to home page carousel) */
.home-page #carouselExampleControls .carousel-item {
  position: relative; /* ensure positioning context for overlay */
}

.home-page #carouselExampleControls .carousel-item::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(220px, 30vw, 460px);
  aspect-ratio: 3 / 1; /* approximate logo ratio; keeps height responsive */
  background: url('/static/img/BannerLogo.png') center/contain no-repeat;
  z-index: 5; /* above image, below captions/controls */
  pointer-events: none; /* do not interfere with controls */
  opacity: 0.96; /* subtle blend */
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.15));
}

.home-page #carouselExampleControls .carousel-item::after {
  content: "Bridging access, insight and trust";
  position: absolute;
  left: 50%;
  top: 62%; /* slightly under the centered logo */
  transform: translateX(-50%);
  z-index: 6; /* above image, below captions/controls if needed */
  pointer-events: none;
  color: #ffffff;
  font-weight: 200;
  text-align: center;
   font-size: clamp(12px, 2.2vw, 22px);
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  letter-spacing: 0.3px;
}

/* Second slide tagline override */
.home-page #carouselExampleControls .carousel-item:nth-child(2)::after {
  content: "Reimagining Investor access in the digital era";
}
/* third slide tagline override */
.home-page #carouselExampleControls .carousel-item:nth-child(3)::after {
  content: "Strengthening the Investor - IRO relationship";
}
/* fourth slide tagline override */
.home-page #carouselExampleControls .carousel-item:nth-child(4)::after {
  content: "Built for the capital behind the markets";
}
/* fifth slide tagline override */
.home-page #carouselExampleControls .carousel-item:nth-child(5)::after {
  content: "Where Issuers and Investors connect";
}

@media (max-width: 768px) {
  .home-page #carouselExampleControls .carousel-item::before {
    width: clamp(117px, 54.6vw, 286px); 
    top: 56%;
  }

  .home-page #carouselExampleControls .carousel-item::after {
    top: 66%;
    font-size: clamp(12px, 3.8vw, 18px);
  }
}

@media (max-width: 480px) {
  .home-page #carouselExampleControls .carousel-item::before {
    width: clamp(143px, 65vw, 312px); 
    top: 45%;
  }

  .home-page #carouselExampleControls .carousel-item::after {
    top: 68%;
    font-size: clamp(11px, 4.2vw, 16px);
  }
}