/* 
  Fuar Takvimi Özel Stilleri (takvim.css)
*/

:root {
  --primary-color-lt: #e6f2ff;
  --ft-bg: #f8f9fa;
  --ft-border: #e9ecef;
  --ft-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --ft-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --ft-border-radius: 12px;
  --ft-transition: all 0.3s ease;

  /* Badge Colors */
  --badge-upcoming-bg: #e6f4ea;
  --badge-upcoming-text: #1e8e3e;
  --badge-ongoing-bg: #e8f0fe;
  --badge-ongoing-text: #1a73e8;
  --badge-completed-bg: #f1f3f4;
  --badge-completed-text: #5f6368;
}

/* ==========================================================================
   Filtre Çubuğu (Sticky Header)
   ========================================================================== */
.takvim-filter-wrapper {
  position: sticky;
  top: 0;
  z-index: 1020;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
  transition: padding 0.3s ease, height 0.3s ease;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--ft-border);
  border-radius: var(--ft-border-radius);
}

.takvim-filter-wrapper.is-sticky {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.filter-form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-form-group .form-select {
  border-radius: 8px;
  border: 1px solid var(--ft-border);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: #333;
  box-shadow: none;
  transition: var(--ft-transition);
}

.filter-form-group .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-filter {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.5rem;
  transition: var(--ft-transition);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-filter:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  color: white;
}

/* ==========================================================================
   İstatistik Kartları
   ========================================================================== */
.stat-card {
  background: #fff;
  border-radius: var(--ft-border-radius);
  padding: 1.2rem;
  border: 1px solid var(--ft-border);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--ft-transition);
}

.stat-card:hover {
  box-shadow: var(--ft-shadow);
  transform: translateY(-2px);
  border-color: var(--primary-color-lt);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-icon.blue {
  background: var(--primary-color-lt);
  color: var(--primary-color);
}

.stat-icon.green {
  background: #e6f4ea;
  color: #1e8e3e;
}

.stat-icon.orange {
  background: #fef7e0;
  color: #f29900;
}

.stat-icon.purple {
  background: #f3e8fd;
  color: #9334e6;
}

.stat-content h4 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: #333;
}

.stat-content p {
  font-size: 0.85rem;
  color: var(--secondary-color);
  margin: 0;
  font-weight: 500;
}

/* ==========================================================================
   Takvim Swiper Şeridi
   ========================================================================== */
.calendar-strip-container {
  background: #fff;
  border-radius: var(--ft-border-radius);
  padding: 1.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
  margin-bottom: 1rem;
  border: 1px solid var(--ft-border);
}

.calendar-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.calendar-strip-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.calendar-nav-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn-cal-nav {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--ft-border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: var(--ft-transition);
  padding: 0;
}

.btn-cal-nav:hover {
  background: var(--primary-color-lt);
  border-color: var(--primary-color-lt);
}

.calendar-day-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--ft-transition);
  border: 1px solid transparent;
}

.calendar-day-item:hover {
  background: var(--ft-bg);
}

.calendar-day-item.active {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.calendar-day-item.is-today:not(.active) {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.calendar-day-item .day-name {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  color: var(--secondary-color);
}

.calendar-day-item.active .day-name {
  color: rgba(255, 255, 255, 0.9);
}

.calendar-day-item .day-number {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

/* ==========================================================================
   Tablo & Kart Görünümü Toggle ve Toolbar
   ========================================================================== */
.takvim-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  flex-wrap: wrap;
  gap: 1rem;
  background-color: #fff;
  padding: 1rem 1.5rem;
  border-radius: var(--ft-border-radius) var(--ft-border-radius) 0 0;
  border: 1px solid var(--ft-border);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.takvim-tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 2px solid var(--ft-border);
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.takvim-tabs::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.takvim-tab {
  padding: 0.8rem 0.5rem;
  font-weight: 600;
  color: var(--secondary-color);
  cursor: pointer;
  position: relative;
  transition: var(--ft-transition);
  background: transparent;
  border: none;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.takvim-tab:hover {
  color: var(--primary-color);
}

.takvim-tab.active {
  color: var(--primary-color);
}

.takvim-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 2px 2px 0 0;
}

.takvim-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.result-count {
  font-size: 0.9rem;
}

.view-toggle {
  display: flex;
  background: var(--ft-bg);
  border-radius: 6px;
  padding: 2px;
  border: 1px solid var(--ft-border);
}

.btn-view {
  background: transparent;
  border: none;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  transition: var(--ft-transition);
}

.btn-view.active {
  background: #fff;
  color: var(--primary-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Tablo Görünümü (Desktop)
   ========================================================================== */
.takvim-table-container {
  background: #fff;
  border-radius: 0 0 var(--ft-border-radius) var(--ft-border-radius);
  border: 1px solid var(--ft-border);
  border-top: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.takvim-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  table-layout: fixed;
}

.takvim-table th {
  background-color: var(--ft-bg);
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1.2rem 1rem;
  border-bottom: 1px solid var(--ft-border);
}

.takvim-table td {
  padding: 1.2rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--ft-border);
  transition: var(--ft-transition);
  font-size: 0.85rem;
}

.takvim-table tbody tr {
  transition: var(--ft-transition);
  position: relative;
}

.takvim-table tbody tr:last-child td {
  border-bottom: none;
}

.takvim-table tbody tr:hover {
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
  z-index: 10;
}

.takvim-table tbody tr:hover td {
  border-bottom-color: transparent;
}

/* ==========================================================================
   Tablo İçi Hücre İçerikleri
   ========================================================================== */
.fuar-info-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.fuar-logo-box {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  border: 1px solid var(--ft-border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.fuar-logo-box img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.fuar-title-box h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.3rem 0;
  color: #222;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.status-badge.upcoming {
  background: var(--badge-upcoming-bg);
  color: var(--badge-upcoming-text);
}

.status-badge.ongoing {
  background: var(--badge-ongoing-bg);
  color: var(--badge-ongoing-text);
}

.status-badge.completed {
  background: var(--badge-completed-bg);
  color: var(--badge-completed-text);
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.info-item i {
  color: var(--primary-color);
  margin-top: 3px;
}

.info-item .text-main {
  font-weight: 600;
  color: #333;
  display: block;
  font-size: 0.85rem;
}

.info-item .text-sub {
  font-size: 0.75rem;
  color: var(--secondary-color);
  display: block;
}

.btn-detail {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color-lt);
  border-radius: 20px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--ft-transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.takvim-table tbody tr:hover .btn-detail {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* ==========================================================================
   Kart Görünümü (Mobil & Opsiyonel Desktop)
   ========================================================================== */
.takvim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 10px;
}

.fuar-card {
  background: #fff;
  border-radius: var(--ft-border-radius);
  border: 1px solid var(--ft-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  padding: 1.2rem;
  transition: var(--ft-transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.fuar-card:hover {
  box-shadow: var(--ft-shadow-hover);
  border-color: var(--primary-color-lt);
}



.fuar-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ft-bg);
}

.fuar-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex-grow: 1;
}

.fuar-card-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   Skeleton Loading
   ========================================================================== */
.skeleton-box {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  width: 100%;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.title {
  height: 20px;
  width: 80%;
}

.skeleton-avatar {
  width: 50px;
  height: 50px;
  border-radius: 8px;
}

.skeleton-badge {
  width: 80px;
  height: 22px;
  border-radius: 20px;
}

.skeleton-button {
  width: 100px;
  height: 32px;
  border-radius: 20px;
}

/* ==========================================================================
   Daha Fazla Yükle (Load More)
   ========================================================================== */
.load-more-wrapper {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--ft-border);
}

.btn-load-more {
  background: #fff;
  color: #333;
  border: 1px solid var(--ft-border);
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  transition: var(--ft-transition);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.btn-load-more:hover {
  background: var(--ft-bg);
  border-color: #ccc;
  transform: translateY(-2px);
}

/* ==========================================================================
   Responsive Ayarları
   ========================================================================== */
@media (max-width: 991.98px) {

  /* Tablet ve altı için tablo sütun daraltması */
  .takvim-table .hide-on-tablet {
    display: none;
  }

  /* Tablet ve Mobilde tablonun gizlenmesi, kart ızgarasının (grid) gösterilmesi */
  .takvim-table-container {
    display: none !important;
  }

  .takvim-grid {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  /* Tablet ve Mobilde View Toggle butonlarının gizlenmesi (sadece kart) */
  .view-toggle {
    display: none;
  }
}

@media (max-width: 767.98px) {

  /* Sticky Filtrenin Mobilde Davranışı (Drawer veya Basit Akış) */
  .takvim-filter-wrapper {
    position: relative;
    /* Mobilde sticky'i iptal edebilir veya drawer'a taşıyabiliriz */
  }
}

@media (max-width: 575.98px) {
  /* İstatistik Kartlarının Mobilde Yatay Kaydırılabilir Olması */
  .stats-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  
  .stats-row::-webkit-scrollbar {
    display: none;
  }

  .stats-row .col-6 {
    flex: 0 0 65% !important;
    max-width: 65% !important;
    width: 65% !important;
    scroll-snap-align: start;
  }
}

/* Custom CSS Tooltip */
.takvim-tooltip-container {
  position: relative;
  display: inline-block;
  cursor: help;
}

.takvim-tooltip {
  visibility: hidden;
  opacity: 0;
  width: 200px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 10px;
  position: absolute;
  z-index: 99999;
  bottom: 125%;
  /* Position above */
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.3s, visibility 0.3s;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.takvim-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.takvim-tooltip-container:hover .takvim-tooltip {
  visibility: visible;
  opacity: 1;
}