@import "micromodal.scss";

// The existing calendar-related styles
.msep-calendar-wrapper {
  position: relative;
  padding-top: 70px;

  table {
    margin: 0 !important;
  }

  .fc-event-description {
    font-size: 0.8em;
    color: #333 !important;
  }

  .fc-event-presenters {
    font-size: 1em;
    font-style: italic;
  }

  .fc-timegrid-slot-label {
    font-size: .6em; /* or specify the size in px, pt, etc. */
    margin-right: 5px;
    color: #333;
  }

  .fc-timegrid-slot-label-frame {
    text-align: left;
  }

  .fc-resource {
    color: #333;
    font-weight: 400;
  }

  .fc-theme-standard td, .fc-theme-standard th{ border: 1px solid #999;}

  .fc-timegrid-slot-minor {
    border-bottom: 1px solid #999 !important;
    border-top: 1px dotted #999 !important;
  }

  .fc .fc-timegrid-slot-label {
    vertical-align: top;
    padding-top: 5px;
  }

  .fc-timegrid-event-harness {
    overflow: hidden;
  }

  .fc-event-main {
    overflow-y: auto;
  }

  .fc-header-toolbar {
    position: absolute;
    top: 0;
    width: 100%;
    max-width: 100%;
  }

  .fc-col-header {
    .fc-col-header-cell-cushion {
      font-weight: bold;
    }
  }

  .msep-event-calendar-title {
    font-size: 1.1em;
  }

  .msep-event-calendar-title:hover {
    text-decoration: underline;
    cursor: pointer;
  }
}

.msep-event {
  margin-bottom: 3px;
  border-top-width: 0;
  border-right-width: 0;
  border-bottom-width: 0;
  border-left-width: 5px;
  padding-left: 0.2rem;
  border-radius: 7px;
}

.msep-stages-vertical-placeholder {
  overflow-x: auto;
}

@media (max-width: 767.98px) {
  .msep-calendar-wrapper {
    padding-top: 90px;

    .fc .fc-toolbar.fc-header-toolbar {
      display: block;
      text-align: center;
    }

    .fc-header-toolbar .fc-toolbar-chunk {
      display: block;
      margin-bottom: 10px;
    }
  }
}

ul.msep-event-list {
  list-style-type: disc;
  padding-left: 30px;
}

ul.msep-event-list li {
  margin-bottom: 10px;
}

// Archive Styles for Event and Presenter archives
// Common archive styles
.msep-archive-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  width: 100%;
}

.msep-archive-header {
  margin-bottom: 2rem;
  text-align: center;
}

.msep-archive-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.msep-archive-description {
  color: #7f8c8d;
  max-width: 800px;
  margin: 0 auto;
}

// Grid layout for archive items - base styles
.msep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

// Card styles
.msep-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  &:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  }
}

.msep-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.msep-card-image {
  height: 200px;
  position: relative;
  overflow: hidden;

  img {
    min-height: 100%;
    min-width: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s ease;
  }

  .msep-card:hover & img {
    transform: scale(1.05);
  }
}

.msep-no-image {
  height: 100%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.msep-card-content {
  padding: 1.5rem;
}

.msep-card-title {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  color: #2c3e50;
}

.msep-card-meta {
  font-size: 0.9rem;
  color: #7f8c8d;
  display: flex;
  justify-content: space-between;
}

// Special elements
.msep-language-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  padding: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.msep-language-icon {
  width: 24px;
  height: auto;
  display: block;
}

.msep-meta-date {
  font-weight: 600;
}

.msep-no-results {
  text-align: center;
  color: #7f8c8d;
  padding: 3rem 0;
}

// Pagination
.msep-pagination {
  margin: 2rem 0;
  text-align: center;

  .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 4px;
    background: #fff;
    color: #2c3e50;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, color 0.3s ease;

    &.current {
      background: #3498db;
      color: #fff;
    }

    &:hover:not(.current) {
      background: #f5f5f5;
    }
  }
}

// Responsive styles
@media (max-width: 992px) {
  .msep-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .msep-archive-title {
    font-size: 2rem;
  }

  .msep-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .msep-archive-container {
    margin: 1rem auto;
  }

  .msep-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 1rem;
  }

  .msep-card-content {
    padding: 1rem;
  }

  .msep-card-title {
    font-size: 1rem;
  }

  .msep-card-meta {
    flex-direction: column;
    font-size: 0.8rem;
  }
}

// Presenter-specific styles
.msep-presenter-image {
  height: 300px; // Taller images for presenter cards
}

// Single template styles
.msep-presenter-container,
.msep-event-container {
  max-width: 1200px;
  margin: 2rem auto;
  background-color: #fff;
  padding: 2rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  line-height: 1.6;
}

// Single Event Template Styles
.msep-event-header {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.msep-img-container {
  flex: 0 0 200px;
  width: 200px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.msep-event-info {
  flex: 1;
  min-width: 250px;
}

.msep-event-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.msep-event-meta {
  font-size: 1rem;
  color: #7f8c8d;
  margin-bottom: 0.5rem;
}

.msep-event-section {
  margin-bottom: 2rem;
}

.msep-section-title {
  font-size: 1.8rem;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.msep-presenter-list {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.msep-presenter-link {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;

  &:hover {
    color: #2980b9;
  }
}

.msep-presenter-role {
  font-style: italic;
  color: #7f8c8d;
}

// Navigation Styles
.msep-navigation {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 1rem;
}

.msep-back-link {
  display: inline-block;
  color: #3498db;
  text-decoration: none;
  font-size: 1rem;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
  
  &:hover {
    background-color: #f5f5f5;
    color: #2980b9;
  }
}

// Single Presenter Template Styles
.msep-presenter-header {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: normal;
}

.msep-presenter-image {
  flex: 0 0 200px;
  width: 200px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.msep-presenter-info {
  flex: 1;
  min-width: 250px;
}

.msep-presenter-name {
  font-size: 2.5rem;
  color: #2c3e50;
  margin: 0;
}

.msep-presenter-meta {
  font-size: 1rem;
  color: #7f8c8d;
  margin-bottom: 0.5rem;
}

.msep-presenter-section {
  margin-bottom: 2rem;
}

.msep-social-list {
  display: flex;
  gap: 0.5rem;
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.msep-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: #ecf0f1;
  border-radius: 50%;
  transition: background-color 0.3s ease;

  &:hover {
    background-color: #3498db;
  }

  img {
    width: 20px;
    height: 20px;
  }
}

.msep-events-section {
  margin-bottom: 2rem;
}

.msep-fair-events {
  margin-bottom: 1.5rem;
}

.msep-fair-title {
  font-size: 1.4rem;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.msep-event-list {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.msep-event-link {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
  cursor: pointer;

  &:hover {
    color: #2980b9;
  }
}

.msep-event-role {
  font-style: italic;
  color: #7f8c8d;
}

// Modal Template Styles
.msep-event-content {
  max-width: 100%;
  margin: 0;
  padding: 1rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  line-height: 1.6;
}

.presenter-details {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.msep-presenter-image {
  width: 100px;
  height: 100px;
}

.presenter-text-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  h2 {
    margin: 0;
    font-size: 1.5rem;
  }

  p {
    margin: 0;
    font-size: 1rem;
  }
}

.msep_modal__head {
  display: flex;
  align-items: flex-start;
}

.msep_modal__stage,
.msep_modal__date {
  font-size: 0.8rem;
  color: #666666;
  margin-right: 1rem;
  line-height: 1rem;
}

.msep_modal__flag {
  margin-left: 1rem;
}

.msep_modal__title_container {
  display: flex;
  align-items: center;
  margin-left: auto;

  .msep_modal__title_box {
    p {
      line-height: 1.4rem;
    }
  }
}

.msep_modal__img {
  max-width: 150px;
  height: auto;
  overflow: hidden;

  img {
    padding-right: 1rem;
  }
}

// Responsive styles for both single templates
@media (max-width: 768px) {
  .msep-presenter-container,
  .msep-event-container {
    padding: 1rem;
  }

  .msep-event-header,
  .msep-presenter-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .msep-img-container,
  .msep-presenter-image {
    width: 150px;
    height: 150px;
    margin-bottom: 1rem;
  }

  .msep-event-title,
  .msep-presenter-name {
    font-size: 2rem;
  }

  .msep-section-title,
  .msep-fair-title {
    font-size: 1.5rem;
  }

  .msep-social-list {
    justify-content: center;
  }
}