/**
 * Seamless Addon - Events Widget Styles
 */

/* Breadcrumb widget: remove Elementor container border/padding divider */
.elementor-widget-seamless-event-breadcrumbs > .elementor-widget-container {
  border: none !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
}

/* Common Item Styles */
.seamless-item {
  margin-bottom: 30px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.seamless-item-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: #333;
}

.seamless-item-content {
  color: #666;
  line-height: 1.6;
}

.seamless-item-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.seamless-item-date,
.seamless-item-location,
.seamless-item-time {
  display: flex;
  align-items: center;
  margin: 8px 0;
  color: #666;
  font-size: 14px;
}

.seamless-icon {
  margin-right: 6px;
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.seamless-item-excerpt {
  margin: 15px 0;
  color: #666;
}

.seamless-item-footer {
  margin-top: 15px;
}

.seamless-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.seamless-btn:hover {
  background-color: #005177;
  color: #fff;
}

.seamless-btn-link {
  color: #0073aa;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.seamless-btn-link:hover {
  color: #005177;
}

/* Grid Layout */
.seamless-layout-grid {
  display: grid;
  gap: 30px;
}

.seamless-grid-cols-1 {
  grid-template-columns: 1fr;
}

.seamless-grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.seamless-grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.seamless-grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.seamless-layout-grid .seamless-item {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.seamless-layout-grid .seamless-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.seamless-layout-grid .seamless-item-content {
  padding: 20px;
}

/* Timeline Layout */
.seamless-layout-timeline {
  position: relative;
}

.seamless-timeline-item {
  display: grid;
  grid-template-columns: 80px 40px 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.seamless-timeline-date {
  text-align: center;
  padding: 10px;
}

.seamless-timeline-month {
  font-size: 14px;
  text-transform: uppercase;
  font-weight: 600;
  color: #0073aa;
}

.seamless-timeline-day {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  line-height: 1;
}

.seamless-timeline-connector {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.seamless-timeline-dot {
  width: 16px;
  height: 16px;
  background: #0073aa;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #0073aa;
  flex-shrink: 0;
}

.seamless-timeline-line {
  width: 2px;
  flex-grow: 1;
  background: #e5e5e5;
  margin-top: 8px;
}

.seamless-timeline-item:last-child .seamless-timeline-line {
  display: none;
}

.seamless-timeline-content {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Calendar Layout */
.seamless-info {
  background: #f0f6fc;
  border-left: 4px solid #0073aa;
  padding: 15px;
  margin-bottom: 20px;
  color: #333;
}

/* No Events Message */
.seamless-no-events {
  padding: 40px;
  text-align: center;
  color: #666;
  font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .seamless-grid-cols-3,
  .seamless-grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .seamless-timeline-item {
    grid-template-columns: 60px 30px 1fr;
    gap: 15px;
  }

  .seamless-timeline-day {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .seamless-grid-cols-2,
  .seamless-grid-cols-3,
  .seamless-grid-cols-4 {
    grid-template-columns: 1fr;
  }
}

/* Hide view toggle buttons immediately when default view is not "all" */
/* This CSS loads before JavaScript, preventing flash */
.seamless-elementor-wrapper[data-default-view="grid"]
  .view-toggle-button-container,
.seamless-elementor-wrapper[data-default-view="list"]
  .view-toggle-button-container,
.seamless-elementor-wrapper[data-default-view="calendar"]
  .view-toggle-button-container {
  display: none !important;
}

/* Also target when inside #eventWrapper */
.seamless-elementor-wrapper[data-default-view="grid"]
  #eventWrapper
  .view-toggle-button-container,
.seamless-elementor-wrapper[data-default-view="list"]
  #eventWrapper
  .view-toggle-button-container,
.seamless-elementor-wrapper[data-default-view="calendar"]
  #eventWrapper
  .view-toggle-button-container {
  display: none !important;
}

/* Hide search bar section immediately when show_search is false */
/* This CSS loads before JavaScript, preventing flash */
.seamless-elementor-wrapper[data-show-search="false"] .hero-section,
.seamless-elementor-wrapper[data-show-search="false"] .filter-form,
.seamless-elementor-wrapper[data-show-search="false"] .filter-controls,
.seamless-elementor-wrapper[data-show-search="false"] .event-search-filter,
.seamless-elementor-wrapper[data-show-search="false"]
  #eventWrapper
  .hero-section,
.seamless-elementor-wrapper[data-show-search="false"]
  #eventWrapper
  .filter-form,
.seamless-elementor-wrapper[data-show-search="false"]
  #eventWrapper
  .filter-controls,
.seamless-elementor-wrapper[data-show-search="false"]
  #eventWrapper
  .event-search-filter {
  display: none !important;
}

/* Filter By Select - Match existing filter styling */
#eventWrapper .filter-controls #seamless-filter-by-select,
#eventWrapper .filter-controls #seamless-filter-by-category,
#eventWrapper .filter-controls #seamless-filter-by-tag,
#eventWrapper .filter-controls .seamless-filter-by-select {
  width: 15%;
  border-radius: 50px !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
  padding-right: 40px;
  border-color: var(--seamless-secondary-color);
  text-transform: uppercase;
  color: var(--seamless-muted-text-color);
  background-color: var(--seamless-background-color);
  padding: 10px 14px;
  padding-right: 40px;
  border: 1px solid var(--seamless-secondary-color);
  font-size: 16px;
  transition: all 0.3s ease;
  max-height: 45px;
}

#eventWrapper .filter-controls #seamless-filter-by-select:focus,
#eventWrapper .filter-controls #seamless-filter-by-category:focus,
#eventWrapper .filter-controls #seamless-filter-by-tag:focus,
#eventWrapper .filter-controls .seamless-filter-by-select:focus {
  border-color: var(--seamless-focus-color);
  box-shadow: 0 0 0 3px #007bff33;
  outline: none;
}

/* ============================================
   Pagination Styles
   ============================================ */

/* Pagination Wrapper */
.seamless-pagination-wrapper {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.seamless-pagination-wrapper.text-left {
  justify-content: flex-start;
}

.seamless-pagination-wrapper.text-center {
  justify-content: center;
}

.seamless-pagination-wrapper.text-right {
  justify-content: flex-end;
}

/* Numbers Pagination Enhancement */
.seamless-pagination-numbers {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
}

.seamless-pagination-numbers #pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}

/* Load More Button */
.seamless-load-more-wrapper {
  width: 100%;
}

.seamless-load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 30px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  background-color: #6ec1e4;
  color: #fff;
  transition: all 0.3s ease;
}

.seamless-load-more-btn:hover {
  background-color: #4fa8d0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.seamless-load-more-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.seamless-load-more-btn .btn-text {
  display: inline-block;
}

/* Hide Native Pagination when using Load More */
.seamless-elementor-wrapper[data-pagination-type="load_more"]
  #eventWrapper:not(.seamless-event-wrapper-without-dropdown)
  #pagination {
  display: none !important;
}

/* Hide All Pagination when type is none */
.seamless-elementor-wrapper[data-pagination-type="none"] #pagination,
.seamless-elementor-wrapper[data-pagination-type="none"]
  .seamless-pagination-wrapper {
  display: none !important;
}

/* Page Link Styling within wrapper */
.seamless-pagination-wrapper .seamless-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.seamless-pagination-wrapper .seamless-page-link:hover {
  background-color: #e5e5e5;
  border-color: #6c5ce7;
  color: #6c5ce7;
}

.seamless-pagination-wrapper .seamless-page-link.seamless-active,
.seamless-pagination-wrapper .seamless-page-link.active {
  background-color: #6c5ce7;
  border-color: #6c5ce7;
  color: #fff;
}

.seamless-pagination-wrapper .seamless-page-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Responsive Pagination */
@media (max-width: 768px) {
  .seamless-load-more-btn {
    padding: 10px 24px;
    font-size: 14px;
  }

  .seamless-pagination-wrapper .seamless-page-link {
    min-width: 34px;
    height: 34px;
    padding: 6px 10px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .seamless-load-more-btn {
    width: 100%;
    padding: 12px 20px;
  }

  .seamless-pagination-wrapper {
    gap: 4px;
    margin-top: 0;
  }
}

/* Event Calendar Button */
.event-info-item.event-calendar-button-wrapper {
  line-height: 1.4;
}

.event-info-card .event-calendar-button-wrapper .event-info-content {
  width: 100%;
}

.event-info-card .event-calendar-button-wrapper add-to-calendar-button,
.event-info-card .event-calendar-button-wrapper .seamless-calendar-widget-control {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  visibility: inherit !important;
  opacity: inherit !important;
  line-height: inherit !important;
  margin: 0 !important;
}

/* Event Tickets */
.event-info-card .event-info-item {
  display: flex;
}

.event-info-card .ticket-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #eee;
}

.event-info-card .ticket-content {
  min-width: 0;
}

.event-info-card .ticket-registration-end {
  margin-top: 4px;
  font-size: 12px;
  line-height: 18px;
  font-style: italic;
  color: var(--seamless-muted-text-color, #666);
}

.event-info-card .event-register-btn,
.event-info-card .event-past-btn,
.event-info-card .event-coming-soon-btn {
  display: block;
  text-align: center;
}

/* Event Schedule Table - Default Styling */
.event-schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: none;
  background: #fff;
  border-radius: 8px;
}

.event-schedule-table thead {
  background: transparent;
}

.event-schedule-table thead th {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  padding: 12px 20px;
  text-align: left;
  border: 1px solid var(--seamless-primary-color);
}

.event-schedule-table tbody tr {
  background: #fff;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s ease;
}

.event-schedule-table tbody tr:hover {
  background-color: #f9fafb;
}

.event-schedule-table tbody tr:last-child {
  border-bottom: none;
}

.event-schedule-table tbody td {
  font-size: 14px;
  color: #374151;
  padding: 12px 20px;
  text-align: left;
  border: none;
  vertical-align: middle;
  line-height: 1.5;
}

.event-schedule-table tbody td p {
  margin: 0;
  line-height: 1.5;
}

.event-schedule-table tbody td:first-child {
  font-weight: 500;
  color: #1f2937;
}

table.event-schedule-table thead tr th {
  background: var(--seamless-primary-color) !important;
}

table.event-schedule-table thead tr th:first-child {
  border-top-left-radius: 8px;
}

table.event-schedule-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}

table.event-schedule-table thead tr th:last-child {
  border-top-right-radius: 8px;
}

table.event-schedule-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}

.event-schedule-days {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.event-schedule-day-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--seamless-medium-border-color, #e5e5e5);
  color: var(--seamless-primary-color, #26337a);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
}

.event-schedule-day-title svg {
  display: block;
  color: currentColor;
}
/* Sponsor section typography parity with reference design */
#singleEventWrapper .event-sponsors-section .sponsors-title {
  margin: 0 0 12px !important;
  font-size: 41px !important;
  line-height: 1.15 !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  color: #0c3b6f !important;
}

#singleEventWrapper .event-sponsors-section .sponsors-description {
  margin: 0 !important;
  max-width: 980px;
  font-size: 35px !important;
  line-height: 1.35 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  color: #1b2b43 !important;
}

#singleEventWrapper .event-sponsors-section .seamless-sponsor-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  text-decoration: none !important;
}

@media (max-width: 1024px) {
  #singleEventWrapper .event-sponsors-section .sponsors-title {
    font-size: 32px !important;
  }

  #singleEventWrapper .event-sponsors-section .sponsors-description {
    font-size: 25px !important;
  }
}

@media (max-width: 768px) {
  #singleEventWrapper .event-sponsors-section .sponsors-title {
    font-size: 26px !important;
    line-height: 1.2 !important;
  }

  #singleEventWrapper .event-sponsors-section .sponsors-description {
    font-size: 20px !important;
    line-height: 1.4 !important;
  }
}

/* Elementor sponsors carousel widget (matches React sponsors section UI) */
.seamless-sponsors-carousel-widget.seamless-sponsors-section {
  margin-top: 40px;
}

.seamless-sponsors-carousel-widget .seamless-sponsors-title {
  margin: 0 0 12px;
  color: #0c3b6f;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 400;
}

.seamless-sponsors-carousel-widget .seamless-sponsors-description {
  margin: 0 0 20px;
  max-width: 980px;
  color: #1b2b43;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 400;
}

.seamless-sponsors-carousel-widget .seamless-sponsors-carousel {
  position: relative;
  width: 100%;
}

.seamless-sponsors-carousel-widget .seamless-sponsor-slider-window {
  overflow: hidden;
  width: 87%;
  margin: 0 auto;
}

.seamless-sponsors-carousel-widget .seamless-sponsor-slider-track {
  display: flex;
  align-items: stretch;
  will-change: transform;
}

.seamless-sponsors-carousel-widget .seamless-sponsor-slide {
  border: 1px solid #d1d5db;
  border-radius: 12px;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  background: #fff;
}

.seamless-sponsors-carousel-widget .seamless-sponsor-link {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.seamless-sponsors-carousel-widget .seamless-sponsor-image {
  max-width: 100%;
  max-height: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.seamless-sponsors-carousel-widget .seamless-sponsor-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--seamless-secondary-color, #06b6d4);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 22px;
  line-height: 1;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
}

.seamless-sponsors-carousel-widget .seamless-sponsor-nav-prev {
  left: 8px;
}

.seamless-sponsors-carousel-widget .seamless-sponsor-nav-next {
  right: 8px;
}

.seamless-sponsors-carousel-widget .seamless-sponsor-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.seamless-sponsors-carousel-widget .seamless-sponsor-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: #d1d5db;
  cursor: pointer;
  padding: 0;
  min-width: 12px;
  min-height: 12px;
}

.seamless-sponsors-carousel-widget .seamless-sponsor-dot.active {
  background: var(--seamless-secondary-color, #06b6d4);
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

@media (max-width: 1024px) {
  .seamless-sponsors-carousel-widget .seamless-sponsors-title {
    font-size: 20px;
  }

  .seamless-sponsors-carousel-widget .seamless-sponsors-description {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .seamless-sponsors-carousel-widget .seamless-sponsors-title {
    font-size: 20px;
    line-height: 1.2;
  }

  .seamless-sponsors-carousel-widget .seamless-sponsors-description {
    font-size: 16px;
    line-height: 1.4;
  }

  .seamless-sponsors-carousel-widget .seamless-sponsor-slider-window {
    width: calc(100% - 80px);
  }
}
