/* Time Schedule Agenda Plugin Styles v2.2 - Sticky Header Fix */

:root {
  --ts-border-color: #e0e0e0;
  --e-bg: #f5f5f5;
  --ts-header-text: #333;
  --ts-primary-color: #4285f4;
  --ts-header-bg: #f5f5f5;
}

/* ======================================================= */
/* Tabs System s                                            */
/* ======================================================= */

.ts-tabs-container {
  width: 100%;
}
.ts-tab-input {
  display: none !important;
}
.ts-tab-label {
  display: inline-block;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--ts-border-color);
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  margin-right: 5px;
  background-color: white;
  position: relative;
  /* bottom: -1px; */
  bottom: -4px;
}
.ts-tab-content {
  display: none !important;
}
.ts-tab-input:checked + .ts-tab-label {
  background-color: #f5f5f5;
  border-bottom: 1px solid #fff;
  color: #e00b00;
  height: 45px;
}
#ts-tab1:checked ~ #ts-content1,
#ts-tab2:checked ~ #ts-content2 {
  display: block !important;
}

/* ======================================================= */
/* Scroll Container                                        */
/* ======================================================= */

.ts-grid-wrapper {
  /* No vertical scroll here; grid handles both axes */
  overflow: visible;
  position: relative;
}
.ts-grid-wrapper.ts-grid-scrollable {
  /* preserve horizontal scroll on wrapper if needed */
  overflow: visible;
}

/* ======================================================= */
/* Schedule Grid                                           */
/* ======================================================= */

.ts-grid-container {
  display: grid;
  grid-template-columns: 60px repeat(calc(var(--total-cols) - 1), 400px);
  /* grid-template-rows: 60px repeat(var(--total-rows, 50), 100px); */
  grid-template-rows: 50px repeat(var(--total-rows, 50), 50px);
  border: 1px solid var(--ts-border-color);
  background-color: #fff;
  max-height: 70vh;
  overflow-x: auto;
  overflow-y: auto;
  position: relative;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--ts-border-color),
    var(--ts-border-color) 0px,
    transparent 1px,
    transparent 50px
  );
  background-size: 100% 100px;
  background-position: 0px 200px;
  background-attachment: local;
}

/* ======================================================= */
/* Sticky Headers                                          */
/* ======================================================= */

.ts-header {
  background-color: var(--ts-header-bg);
  color: var(--ts-header-text);
  padding: 12px;
  text-align: center;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--ts-border-color);
  border-right: 1px solid var(--ts-border-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 60px;
  box-sizing: border-box;
}
.ts-header:last-child {
  border-right: none;
}
.ts-header.ts-time-col {
  position: sticky;
  left: 0;
  z-index: 12;
}

.stage-title {
  font-weight: bold;
  font-size: 1.1em;
}
.stage-description {
  font-size: 0.9em;
  font-weight: normal;
  color: #555;
  margin-top: 8px;
  line-height: 1.4;
}
.stage-description img {
  max-width: 100px;
  height: auto;
  margin-top: 5px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.stage-description p {
  margin: 0;
  padding: 0;
}

/* ======================================================= */
/* Event Item                                              */
/* ======================================================= */

.ts-event-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border-radius: 4px;
  padding: 8px;
  margin: 1px;
  color: white;
  font-size: 13px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}
.ts-event-item .ts-time {
  display: block;
  font-size: 0.9em;
  opacity: 0.85;
}
.ts-event-item .ts-title {
  display: block;
  margin-top: 4px;
  font-weight: 700;
}
.ts-event-notes {
  font-size: 0.9em;
  opacity: 0.9;
  margin-top: 10px;
}

/* ======================================================= */
/* Speakers & Moderators                                   */
/* ======================================================= */

.ts-speakers-list,
.ts-moderators-list {
  margin-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 10px;
  font-size: 0.85em;
  opacity: 0.9;
}
.ts-speaker {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.ts-speaker-photo {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.ts-speaker-info {
  display: flex;
  flex-direction: column;
  width: 75%;
}
.ts-speaker-name {
  font-weight: bold;
}
.ts-speaker-job {
  font-size: 0.85em;
  opacity: 0.8;
}
.ts-company-logo {
  display: none !important;
}
.ts-speaker-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease;
  border-radius: 4px;
}
.ts-speaker-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* ======================================================= */
/* Time Column                                             */
/* ======================================================= */

.ts-time-label {
  text-align: right;
  padding: 5px 10px 0 0;
  font-size: 12px;
  color: #888;
  border-bottom: 1px dotted #f0f0f0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  position: sticky;
  left: 0;
  z-index: 11;
  background-color: #fff;
}
.ts-time-label.full-hour {
  font-size: 13px;
  border-bottom: 1px dotted #f0f0f0;
}

/* ======================================================= */
/* Popup / Modal Styles                                    */
/* ======================================================= */

.ts-popup-content {
  display: none;
}
.ts-popup-wrapper {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}
.ts-popup-wrapper.is-visible {
  display: flex;
  justify-content: center;
  align-items: center;
}
.ts-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}
.ts-popup-container {
  background-color: #fff;
  padding: 30px;
  border-radius: 5px;
  position: relative;
  z-index: 1001;
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: scroll;
}
.ts-popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #888;
}

/* ======================================================= */
/* Responsive Styles for Mobile                            */
/* ======================================================= */

@media (max-width: 768px) {
  .ts-grid-container {
    grid-template-columns: 60px repeat(calc(var(--total-cols) - 1), 200px) !important;
    grid-template-rows: 150px repeat(var(--total-rows, 50), 100px);
  }
  .ts-header {
    font-size: 0.9em;
    height: 150px;
    left: -1px;
  }
  .ts-time-label {
    left: -1px;
  }
  .ts-event-item {
    padding: 8px;
    font-size: 12px;
  }
  .ts-speaker-photo {
    width: 30px;
    height: 30px;
  }
  .ts-speaker-name {
    font-size: 0.9em;
  }
}

/* Adjusted stage description images */
.stage-description img {
  width: 150px;
  height: 100px;
  object-fit: contain;
}
/* ======================================================= */
/* Grab and Scroll Styles                                  */
/* ======================================================= */

.ts-grid-container {
  cursor: grab; /* Ο δείκτης γίνεται "χέρι" πάνω από το πλέγμα */
  user-select: none; /* Αποτρέπει την επιλογή κειμένου κατά το drag */
}

.ts-grid-container.active-grab {
  cursor: grabbing; /* Ο δείκτης γίνεται "γροθιά" κατά το drag */
}

/* ======================================================= */
/* Agenda List View Styles (UPDATED)                       */
/* ======================================================= */

.ts-agenda-list-wrapper {
  width: 100%;
  max-width: 1030px;
  margin: 0 auto;
}

.ts-list-day-title {
  font-size: 24px;
  color: #333;
  border-bottom: 2px solid var(--ts-primary-color, #4285f4);
  padding-bottom: 10px;
  margin-top: 40px;
  margin-bottom: 20px;
}

.ts-list-item {
  display: flex;
  padding: 25px 0;
  border-bottom: 1px solid var(--ts-border-color, #e0e0e0);
}

.ts-list-item-time {
  flex: 0 0 150px;
  font-weight: 600;
  font-size: 16px;
  color: #555;
  padding-right: 20px;
}

.ts-list-item-details {
  flex: 1 1 auto;
}

.ts-list-item-details .ts-list-event-title {
  font-size: 20px;
  font-weight: 700;
  margin-top: 5px;
  margin-bottom: 10px;
  color: #222;
}

.ts-list-event-notes {
  color: #444;
  line-height: 1.6;
  margin-bottom: 20px;
}
.ts-list-event-notes p {
  margin: 0 0 1em 0;
}
.ts-list-speakers-list,
.ts-list-moderators-list {
  margin-top: 15px;
}
.ts-list-section-title {
  display: block;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}
.ts-list-speaker {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  color: #333;
}
.ts-list-speaker-photo {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.ts-list-speaker-info {
  display: flex;
  flex-direction: column;
  width: auto;
}
.ts-list-speaker-name {
  font-weight: bold;
  text-align: left;
}
.ts-list-speaker-job {
  color: #666;
  font-size: 0.9em;
  text-align: left;
}

/* Responsive styles for the list view */
@media (max-width: 600px) {
  .ts-list-item {
    flex-direction: column;
  }
  .ts-list-item-time {
    flex-basis: auto;
    margin-bottom: 15px;
    padding-right: 0;
    font-size: 18px;
  }
  .ts-event-category-desc img {
    height: 20px;
    width: 20px;
  }
  .ts-list-item-time {
    margin-bottom: 0;
  }
}
/* ======================================================= */
/* List View Venue Tabs Styles (Base)                      */
/* ======================================================= */

.ts-list-tabs-container {
  width: 100%;
  margin-top: 20px;
}
.ts-list-tab-input {
  display: none !important;
}
.ts-list-tab-labels {
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
}
.ts-list-tab-label {
  padding: 8px 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #555;
  margin-bottom: -2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.ts-list-tab-label:hover {
  color: #000;
}
.ts-list-tab-content {
  display: none;
}
.ts-list-tab-content-wrapper {
  padding-top: 10px;
}

.ts-event-category-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap; /* για στενές οθόνες */
  margin-top: 6px;
}

.ts-event-category {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2;
}

.ts-event-category-desc {
  font-weight: 400;
  opacity: 0.95;
  line-height: 1.3;
  font-size: 0.95em;
}

.ts-event-category-desc p {
  display: inline;
  margin: 0;
}

.category-image-in-event {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: inline-block;
}

.ts-event-category-wrap--popup {
  gap: 12px;
  margin: 8px 0 6px;
}
.ts-ics-wrap {
  margin-top: 6px;
}

.ts-ics-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 13px;
  opacity: 0.85;
}

.ts-ics-link:hover {
  opacity: 1;
}

.ts-ics-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  background-repeat: no-repeat;
  background-size: contain;
  /* απλό calendar svg inline */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234285f4' d='M7 2h2v2h6V2h2v2h3a1 1 0 0 1 1 1v15a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a1 1 0 0 1 1-1h3V2Zm12 6H5v12h14V8Z'/%3E%3C/svg%3E");
}

.ts-ics-text {
  border-bottom: 1px dotted currentColor;
}
.ts-agenda-list-wrapper {
  padding: 10px;
}
/* MOBILE (<=600px): ΩΡΑ — VENUE — Add to Calendar όλα σε μία γραμμή */
@media (max-width: 600px) {
  .ts-list-item-time {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    /* κράτα το υπάρχον font/spacing σου */
  }
  .ts-time-venue-inline {
    display: inline;
    font-weight: 600;
  }
  .ts-time-only,
  .ts-venue-only {
    display: none;
  } /* κρύβονται στο mobile */
  .ts-ics-wrap {
    margin-left: auto;
  } /* πάει δεξιά */
}

/* DESKTOP (>=601px): κάθετα ΩΡΑ, από κάτω VENUE, από κάτω Add to Calendar */
@media (min-width: 601px) {
  .ts-time-venue-inline {
    display: none;
  } /* κρύβουμε το inline */
  .ts-time-only,
  .ts-venue-only,
  .ts-ics-wrap {
    display: block;
  }
  .ts-time-only {
    font-weight: 600;
  }
  .ts-venue-only {
    margin-top: 6px;
    color: #666;
  }
  .ts-ics-wrap {
    margin-top: 6px;
  }
}
/* MOBILE (<=600px): ΩΡΑ — VENUE — Add to Calendar όλα σε μία γραμμή */
@media (max-width: 600px) {
  .ts-list-item-time {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    /* κράτα το υπάρχον font/spacing σου */
  }
  .ts-time-venue-inline {
    display: inline;
    font-weight: 600;
  }
  .ts-time-only,
  .ts-venue-only {
    display: none;
  } /* κρύβονται στο mobile */
  .ts-ics-wrap {
    margin-left: auto;
  } /* πάει δεξιά */
}

/* DESKTOP (>=601px): κάθετα ΩΡΑ, από κάτω VENUE, από κάτω Add to Calendar */
@media (min-width: 601px) {
  .ts-time-venue-inline {
    display: none;
  } /* κρύβουμε το inline */
  .ts-time-only,
  .ts-venue-only,
  .ts-ics-wrap {
    display: block;
  }
  .ts-time-only {
    font-weight: 600;
  }
  .ts-venue-only {
    margin-top: 6px;
    color: #666;
  }
  .ts-ics-wrap {
    margin-top: 6px;
  }
}
/* --- Defaults (Desktop) --- */
.ts-time-venue-inline {
  display: none;
} /* κρυφό στο desktop */
.ts-time-only,
.ts-venue-only,
.ts-ics-wrap {
  display: block;
}
.ts-list-item-time {
  display: block;
}
.ts-ics-wrap {
  margin-top: 6px;
  float: none;
} /* σιγουριά ότι δεν κάνει float */

/* --- Mobile layout: ΩΡΑ — VENUE — Add to Calendar στην ίδια γραμμή --- */
@media (max-width: 600px) {
  .ts-time-venue-inline {
    display: inline;
    font-weight: 600;
  }
  .ts-time-only,
  .ts-venue-only {
    display: none;
  }

  .ts-list-item-time {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-basis: auto;
    padding-right: 0;
    margin-bottom: 6px;
  }

  .ts-ics-wrap {
    display: inline-flex;
    margin-top: 0; /* να μην πέφτει σε νέα γραμμή */
    float: none; /* ακύρωση πιθανών theme floats */
  }

  .ts-ics-link {
    line-height: 1;
  } /* μικρό οπτικό φινίρισμα */
}
/* Προεπιλογή = Desktop */
.ts-time-venue-inline {
  display: none;
}
.ts-ics-link--mobile {
  display: none;
} /* κρυφό στο desktop */
.ts-ics-wrap--desktop {
  display: block;
}
.ts-ics-wrap--desktop {
  float: none;
  margin-top: 6px;
}

/* Mobile */
@media (max-width: 600px) {
  /* δείξε την ενιαία γραμμή */
  .ts-time-venue-inline {
    display: inline;
    font-weight: 600;
  }
  .ts-time-only,
  .ts-venue-only,
  .ts-ics-wrap--desktop {
    display: none;
  }

  /* δείξε μόνο το mobile link */
  .ts-ics-link--mobile {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
  }
  .ts-ics-link--mobile .ts-ics-text {
    line-height: 1;
  }
}
.ts-live-now {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #e53935; /* κόκκινο */
  border-radius: 3px;
  line-height: 1.2;
  vertical-align: middle;
}
@media (max-width: 600px) {
  .ts-live-now {
    font-size: 12px;
  }
}
.ts-live-now {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #e53935; /* κόκκινο */
  border-radius: 3px;
  line-height: 1.2;
  vertical-align: middle;
}
@media (max-width: 600px) {
  .ts-live-now {
    font-size: 12px;
  }
}
