/* Workshops Page Specific Styles */

.workshops-intro {
  text-align: center;
  margin-bottom: 40px;
}

.workshops-intro p {
  font-size: 1.2rem;
  color: #555;
  max-width: 600px;
  margin: 0 auto;
}

/* Competition Buttons Styles */
.workshops-note-with-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  background: #2a2b0e;
  border-radius: 10px;
  padding: 20px;
  margin-top: 30px;
  text-align: center;
}

.competition-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.competition-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #a44719;
  color: white;
  border: none;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.competition-button:hover {
  background: #8a3a15;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(164, 71, 25, 0.3);
}

.competition-button .material-icons {
  font-size: 0.9rem;
}

.workshops-note {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

/* Workshops Tabs */
.workshops-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  gap: 10px;
  flex-wrap: wrap;
}

.workshops-tab {
  background: white;
  border: 2px solid #a44719;
  color: #a44719;
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.workshops-tab:hover {
  background: #a44719;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(164, 71, 25, 0.3);
}

.workshops-tab.active {
  background: #a44719;
  color: white;
}

/* Workshops Content */
.workshops-content {
  margin-bottom: 40px;
}

.workshops-table,
.long-workshops {
  display: none;
}

.workshops-table.active,
.long-workshops.active {
  display: block;
}

.workshops-header {
  text-align: center;
  margin-bottom: 30px;
}

.workshops-header h3 {
  color: #a44719;
  font-size: 2rem;
  margin-bottom: 10px;
}

.workshops-header .workshops-note {
  color: #fff;
  font-size: 1.2rem;
  margin: 0;
}

/* Workshops Grid */
.workshops-grid {
  overflow-x: auto;
  position: relative;
}

/* Create a scrollable container for the table */
.workshops-table-container {
  overflow-x: auto;
  position: relative;
}

.workshops-table-grid {
  width: auto;
  border-collapse: separate;
  border-spacing: 1px;
  background: #e0e0e0;
  position: relative;
}

/* Table Cells */
.workshops-cell {
  background: white;
  padding: 12px 10px;
  font-size: 1.1rem;
  text-align: center;
  border: none;
  min-height: 80px;
  vertical-align: middle;
  position: relative;
}
.workshops-table-grid th:blank {
  visibility: hidden;
}
.workshops-table-grid th,
.workshops-table-grid td {
  width: auto;
  position: relative;
}

/* First column (workshop name column) - Fixed positioning approach */
.workshops-table-grid th:first-child:not(:empty),
.workshops-table-grid td:first-child {
  position: sticky;
  left: 0;
  z-index: 100;
  background: #f8f9fa;
  color: #2a2b0e;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  width: 250px;
  min-width: 250px;
  max-width: 250px;
  text-align: left;
  padding-left: 8px;
  padding-right: 6px;
  line-height: 1.3;
  word-break: break-word;
}

/* Workshop name cells in the first column */
.workshops-cell.workshop-name-cell {
  background: #f8f9fa;
  color: #2a2b0e;
  font-weight: 600;
  font-size: 0.85rem;
  z-index: 50;
  box-shadow: 2px 0 3px rgba(0, 0, 0, 0.05);
  text-align: left;
  padding-left: 8px;
  padding-right: 6px;
  line-height: 1.3;
  word-break: break-word;
  width: 250px;
  min-width: 250px;
  max-width: 250px;
}

/* Beginner workshop name cells - beige background */
.workshops-cell.workshop-name-cell.beginner,
.workshops-cell.category-cell.beginner {
  background: #f5e6d3;
}

/* Category row (ADVANCED/BEGINNERS) */
.workshops-cell.category-cell {
  background: #f8f9fa;
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
  padding: 15px 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* First cell in category row - sticky like workshop names */
.category-row td:first-child.category-cell {
  position: sticky;
  left: 0;
  z-index: 101;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.15);
  width: 250px;
  min-width: 250px;
  max-width: 250px;
  text-align: left;
  padding-left: 8px;
}

/* Time columns width - always 160px */
.workshops-table-grid th:not(:first-child),
.workshops-table-grid td:not(:first-child) {
  width: 160px;
  min-width: 160px;
  max-width: 160px;
}

/* Workshop cells (time slot cells) */
.workshops-cell.workshop-cell {
  width: 160px;
  min-width: 160px;
  max-width: 160px;
}

/* Time Headers (now at the top instead of left) */
.workshops-cell.time-header {
  background: #f8f9fa;
  color: #2a2b0e;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.2;
  padding: 10px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 90;
  word-break: break-word;
}

/* Break Header */
.workshops-cell.time-header.break-header {
  background: #555;
  color: #ddd;
  font-weight: 500;
}

/* Break cells */
.workshops-cell.workshop-cell.break-cell {
  background: #f5f5f5;
  color: #999;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  vertical-align: middle;
}

/* Workshop Cells - additional styling */
.workshops-cell.workshop-cell {
  background: white;
  border: 1px solid #e0e0e0;
  transition: background-color 0.3s ease;
}

.workshops-cell.workshop-cell:hover {
  background: #f8f9fa;
}

/* Empty cells (cells without events) - light grey */
.workshops-cell.workshop-cell:empty {
  background: #f0f0f0;
}

.workshops-cell.workshop-cell:empty:hover {
  background: #e0e0e0;
}

/* Empty cells for spacing */
.workshops-cell.empty {
  background: #f8f9fa;
}

/* Workshop Events Container */
.workshop-events-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  height: 100%;
  min-height: 60px;
}

/* Workshop Event Blocks */
.workshop-event {
  background: #e8f4fd;
  border: 2px solid #3498db;
  border-radius: 6px;
  padding: 6px 4px;
  margin: 0;
  font-size: 0.85rem;
  color: #2c3e50;
  text-align: center;
  min-height: 55px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  flex: 1;
  transition: all 0.3s ease;
  cursor: pointer;
}

.workshop-event:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
  border-color: #2980b9;
}

/* Multiple events styling - when there are 2+ events in the same time slot */
.workshop-events-container:has(.multiple-events) {
  flex-direction: column;
  gap: 3px;
}

.workshop-events-container:has(.multiple-events) .workshop-event {
  flex: 1;
  min-height: 50px;
  font-size: 0.75rem;
}

/* Fallback for browsers that don't support :has() - using class-based approach */
.workshop-events-container.multiple-events-container {
  flex-direction: column;
  gap: 3px;
}

.workshop-events-container.multiple-events-container .workshop-event {
  flex: 1;
  min-height: 50px;
  font-size: 0.75rem;
}

/* Spanning workshop events */
.workshop-event.spanning {
  min-height: 130px;
}

.workshop-event.beginner {
  color: #2a2b0e;
}

.workshop-event.trad {
  background: #c0e4ff;
  border-color: #2994db;
  color: #01579b;
}

.workshop-event.sport {
  background: #e8f5e8;
  border-color: #388e3c;
  color: #1b5e20;
}

.workshop-event.multipitch {
  background: #ffebee;
  border-color: #d32f2f;
  color: #b71c1c;
}

.workshop-event.bouldering {
  background: #9e9e9e;
  border-color: #616161;
  color: #ffffff;
}

.workshop-event.rapel-climbers {
  background: #e3f2fd;
  border-color: #176bbe;
  color: #0b3f8d;
}

.workshop-event.rapel-experience {
  background: #ffddf9;
  border-color: #af169b;
  color: #880e4f;
}

.workshop-event.injury-prevention {
  background: #f0f0f0;
  border-color: #555;
  color: #555;
}

.workshop-event.top-rope {
  background: #fff8e1;
  border-color: #f9a825;
  color: #e65100;
}

.workshop-event.route-breakdown {
  background: #ffd3a0;
  border-color: #f56200;
  color: #e65100;
}

.workshop-event.belaying {
  background: #e0f2f1;
  border-color: #00796b;
  color: #004d40;
}

.workshop-event.crevasse {
  background: #ffccbc;
  border-color: #ff6f3c;
  color: #bf360c;
}

.workshop-event.technical-rescue {
  background: #e1bee7;
  border-color: #9c27b0;
  color: #4a148c;
}

.workshop-event.trad-aid {
  background: #b2ebf2;
  border-color: #00acc1;
  color: #006064;
}

/* Partial Span Styling - for workshops that don't fit exactly in time slots */
.workshops-cell.partial-span-cell {
  overflow: visible;
  position: relative;
  z-index: 10;
}

.workshop-events-container.partial-span-container {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 20;
  overflow: visible;
}

.workshop-event.partial-span {
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 20;
}

/* Workshop Event Text */
.workshop-event .workshop-code {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2c3e50;
  background: rgba(255, 255, 255, 0.8);
  padding: 3px 6px;
  border-radius: 4px;
  margin-bottom: 3px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.workshop-event .workshop-availability {
  font-size: 0.7rem;
  font-weight: 600;
  color: #2c3e50;
  background: rgba(39, 174, 96, 0.1);
  padding: 2px 4px;
  border-radius: 3px;
  margin-bottom: 2px;
  line-height: 1.3;
}

.workshop-event .workshop-instructor {
  font-size: 0.7rem;
  color: #555;
}

/* Subtle clickable styling for workshop events */
.workshop-event {
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.workshop-event::after {
  content: 'info';
  font-family: 'Material Symbols Outlined';
  font-weight: 700;
  font-style: normal;
  font-size: 16px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  position: absolute;
  top: 4px;
  right: 4px;
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.2s ease;
  color: #666;
}

.workshop-event:hover::after {
  opacity: 1;
  color: #a44719;
}

/* Mobile-specific subtle enhancements for workshop events */
@media (max-width: 767px) {
  .workshop-event::after {
    font-size: 14px;
    top: 2px;
    right: 2px;
    opacity: 0.7;
  }

  .workshop-event:hover::after {
    opacity: 1;
  }
}

/* Long Workshops - Subtle clickable styling */
.long-workshops {
  border: 1px solid #ddd;
  border-radius: 10px;
  margin-bottom: 30px;
  padding: 25px;
  transition: all 0.2s ease;
  margin-bottom: 30px;
  position: relative;
  cursor: pointer;
}

.long-workshops:hover {
  border-color: #a44719;
  border-radius: 10px;
}

/* Subtle click indicator */
.long-workshops::after {
  content: 'info';
  font-family: 'Material Symbols Outlined';
  font-weight: 700;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  position: absolute;
  top: 15px;
  right: 15px;
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.2s ease;
  color: #666;
}

.long-workshops:hover::after {
  opacity: 1;
  color: #a44719;
}

/* Mobile-specific subtle enhancements */
@media (max-width: 767px) {
  .long-workshops::after {
    font-size: 18px;
    top: 12px;
    right: 12px;
    opacity: 0.7;
    background: rgba(164, 71, 25, 0.1);
    padding: 4px;
    border-radius: 50%;
  }
}

/* Additional Information */
.workshops-additional {
  background: #f0f0f0;
  padding: 30px;
  border-radius: 15px;
  margin-bottom: 30px;
}

.additional-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.additional-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.additional-item h4 {
  color: #a44719;
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.additional-item p {
  color: #555;
  font-size: 1.5rem;
  margin: 0;
}

/* Workshops Note */

.workshops-note p {
  color: #fff;
  font-size: 1.1rem;
  margin: 0;
}

.workshops-note strong {
  color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
  .workshops-tabs {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .workshops-tab {
    width: 200px;
    padding: 12px 20px;
    font-size: 1rem;
  }

  .workshops-header h3 {
    font-size: 1.5rem;
  }

  .workshops-table-grid {
    width: auto;
    font-size: 0.8rem;
  }

  .workshops-cell {
    padding: 8px 4px;
    font-size: 0.8rem;
    min-height: 40px;
  }

  /* Workshop name cells (first column) - 125px for mobile */
  .workshops-table-grid th:first-child:not(:empty),
  .workshops-table-grid td:first-child {
    width: 125px;
    min-width: 125px;
    max-width: 125px;
    font-size: 0.75rem;
    padding-left: 6px;
    padding-right: 4px;
  }

  .workshops-cell.workshop-name-cell {
    width: 125px;
    min-width: 125px;
    max-width: 125px;
    font-size: 0.75rem;
    padding-left: 6px;
    padding-right: 4px;
  }

  /* Category cells */
  .workshops-cell.category-cell {
    font-size: 1rem;
    padding: 12px 8px;
  }

  /* First cell in category row - 125px on mobile */
  .category-row td:first-child.category-cell {
    width: 125px;
    min-width: 125px;
    max-width: 125px;
    font-size: 0.9rem;
    padding-left: 6px;
  }

  /* Time headers */
  .workshops-cell.time-header {
    font-size: 0.85rem;
    padding: 10px 4px;
  }

  /* Time columns - always 160px */
  .workshops-table-grid th:not(:first-child),
  .workshops-table-grid td:not(:first-child) {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
  }

  .workshops-cell.workshop-cell {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
  }

  .workshop-event {
    font-size: 0.7rem;
    padding: 6px;
    min-height: 35px;
  }

  .workshop-event .workshop-title {
    font-size: 0.8rem;
  }

  .workshop-event .workshop-time {
    font-size: 0.6rem;
  }

  .workshop-event .workshop-code {
    font-size: 0.85rem;
  }

  .workshop-event .workshop-instructor {
    font-size: 0.6rem;
  }
}

@media (max-width: 480px) {
  .workshops-tab {
    width: 180px;
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  .workshops-header h3 {
    font-size: 1.3rem;
  }

  .workshops-table-grid {
    width: auto;
  }

  .workshops-cell {
    padding: 6px 3px;
    font-size: 0.7rem;
    min-height: 35px;
  }

  /* Workshop name cells (first column) - 125px for mobile */
  .workshops-table-grid th:first-child:not(:empty),
  .workshops-table-grid td:first-child {
    width: 125px;
    min-width: 125px;
    max-width: 125px;
    font-size: 0.7rem;
    padding-left: 6px;
    padding-right: 4px;
  }

  .workshops-cell.workshop-name-cell {
    width: 125px;
    min-width: 125px;
    max-width: 125px;
    font-size: 0.7rem;
    padding: 8px 4px 8px 6px;
  }

  /* Category cells */
  .workshops-cell.category-cell {
    font-size: 0.9rem;
    padding: 10px 6px;
  }

  /* First cell in category row - 125px on mobile */
  .category-row td:first-child.category-cell {
    width: 125px;
    min-width: 125px;
    max-width: 125px;
    font-size: 0.8rem;
    padding-left: 6px;
  }

  /* Time headers */
  .workshops-cell.time-header {
    font-size: 0.75rem;
    padding: 8px 3px;
  }

  /* Time columns - always 160px */
  .workshops-table-grid th:not(:first-child),
  .workshops-table-grid td:not(:first-child) {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
  }

  .workshops-cell.workshop-cell {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
  }

  .workshop-event {
    font-size: 0.6rem;
    padding: 4px;
    min-height: 30px;
  }

  .workshop-event .workshop-title {
    font-size: 0.7rem;
  }

  .workshop-event .workshop-code {
    font-size: 0.75rem;
  }

  .additional-item h4 {
    font-size: 1.1rem;
  }

  .additional-item p {
    font-size: 0.9rem;
  }

  .workshops-note p {
    font-size: 1rem;
  }
}

/* Leaflet Modal Styles */
.leaflet-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.leaflet-modal-content {
  background-color: white;
  margin: 2% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: leafletModalSlideIn 0.3s ease-out;
}

@keyframes leafletModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.leaflet-modal-header {
  background: #a44719;
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 15px 15px 0 0;
}

.leaflet-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.leaflet-close {
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.3s ease;
}

.leaflet-close:hover {
  opacity: 0.7;
}

.leaflet-modal-body {
  padding: 0;
  max-height: calc(90vh - 80px);
  overflow: auto;
}

.leaflet-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
}

.leaflet-image {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.leaflet-image:hover {
  transform: scale(1.02);
}

/* Responsive design for leaflet modal */
@media (max-width: 768px) {
  .leaflet-modal-content {
    width: 95%;
    margin: 5% auto;
  }

  .leaflet-modal-header {
    padding: 15px;
  }

  .leaflet-modal-header h3 {
    font-size: 1.2rem;
  }

  .leaflet-close {
    font-size: 1.5rem;
  }

  .leaflet-image-container {
    padding: 15px;
  }

  .leaflet-image {
    max-height: 60vh;
  }
}

@media (max-width: 480px) {
  .leaflet-modal-content {
    width: 98%;
    margin: 2% auto;
  }

  .leaflet-modal-header {
    padding: 12px;
  }

  .leaflet-modal-header h3 {
    font-size: 1rem;
  }

  .leaflet-image-container {
    padding: 10px;
  }

  .leaflet-image {
    max-height: 50vh;
  }
}

/* Image Not Found Notification */
.image-not-found-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  animation: notificationSlideIn 0.3s ease-out;
}

@keyframes notificationSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notification-content {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 10px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 350px;
}

.notification-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.notification-text {
  color: #856404;
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
}

.notification-close {
  background: none;
  border: none;
  color: #856404;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.notification-close:hover {
  background-color: rgba(133, 100, 4, 0.1);
}

/* Responsive notification */
@media (max-width: 768px) {
  .image-not-found-notification {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .notification-content {
    max-width: none;
    padding: 12px 15px;
  }

  .notification-text {
    font-size: 0.8rem;
  }

  /* Competition buttons mobile styles */
  .workshops-note-with-buttons {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .competition-buttons {
    justify-content: flex-start;
  }

  .competition-button {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .workshops-note {
    min-width: auto;
  }
}
