/* Etkinlik Takvimi Modül CSS */
/* Sabit Etkinlik Takvimi ve Aylık Etkinlik Takvimi için özel stiller */

/* ==================== GENEL MODAL STİLLERİ ==================== */

.event-calendar-modal .modal-dialog {
  max-width: 1200px;
  width: 95vw;
  margin: 20px auto;
}

/* Ana sayfa için özel modal düzeltmeleri */
body:not(.admin-page) .event-calendar-modal .modal-dialog {
  max-width: 1400px !important;
  width: 90vw !important;
  margin: 10px auto !important;
}

/* Ana sayfa modal override - daha güçlü kurallar */
.event-calendar-modal.show .modal-dialog {
  max-width: 1400px !important;
  width: 90vw !important;
  margin: 20px auto !important;
  transform: none !important;
}

/* Modal'ın tam ekran olmasını sağla */
.event-calendar-modal .modal-dialog {
  transform: none !important;
}

.event-calendar-modal {
  z-index: 9999 !important;
}

/* Ana sayfa için özel override'lar - tüm modal sistem reset */
body .event-calendar-modal .modal-dialog {
  max-width: none !important;
  width: 90vw !important;
  margin: 20px auto !important;
  transform: none !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  position: relative !important;
}

/* Ana sayfa container çakışmalarını önle */
body .event-calendar-modal .modal-content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  left: auto !important;
  right: auto !important;
}

/* Homepage modal özel kuralları - tam ortalama */
.homepage-modal {
  z-index: 10000 !important;
}

.homepage-modal .modal-dialog {
  width: 90vw !important;
  max-width: 1400px !important;
  max-height: 90vh !important;
  margin: 0 !important;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 10001 !important;
}

/* Anasayfa body override - önemli */
body:not(.admin-panel) .homepage-modal .modal-dialog {
  width: 90vw !important;
  max-width: 1400px !important;
  max-height: 90vh !important;
  margin: 0 !important;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 10001 !important;
}

/* En güçlü override - anasayfa için */
.homepage-modal.show .modal-dialog {
  width: 90vw !important;
  max-width: 1400px !important;
  max-height: 90vh !important;
  margin: 0 !important;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 10001 !important;
}

/* Modal backdrop için de özel kurallar */
.homepage-modal .modal-backdrop {
  z-index: 10000 !important;
}

.homepage-modal .modal-content {
  width: 100% !important;
  margin: 0 !important;
  max-height: 90vh !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.homepage-modal .modal-body {
  overflow-y: auto !important;
  flex: 1 !important;
}

.event-calendar-modal .modal-content {
  background: linear-gradient(135deg, #2c1810 0%, #3d2817 50%, #2c1810 100%);
  border: 2px solid #bfa76a;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
  color: #fff;
  width: 100%;
  margin: 0;
}

.event-calendar-modal .modal-header {
  background: linear-gradient(90deg, #bfa76a 0%, #d4c385 50%, #bfa76a 100%);
  color: #000000;
  border-bottom: 2px solid #8a7a5a;
  border-radius: 13px 13px 0 0;
  padding: 15px 25px;
}

.event-calendar-modal .modal-title {
  font-weight: 700;
  font-size: 1.4em;
  text-shadow: none;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #000000;
}

.event-calendar-modal .modal-title i {
  font-size: 1.3em;
  color: #000000;
}

.event-calendar-modal .btn-close {
  filter: brightness(0) !important;
  opacity: 1 !important;
  color: #000000 !important;
}

.event-calendar-modal .modal-body {
  padding: 20px 25px;
  background: rgba(0, 0, 0, 0.2);
}

/* ==================== SABİT ETKİNLİK TAKVİMİ STİLLERİ ==================== */

.static-calendar-container {
  background: rgba(24, 24, 24, 0.9);
  border-radius: 10px;
  padding: 20px;
  border: 1px solid #bfa76a;
}

.static-calendar-table {
  width: 100%;
  border-collapse: collapse;
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.static-calendar-table th {
  background: linear-gradient(135deg, #8b4513, #a0522d);
  color: #fff;
  padding: 12px 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9em;
  border: 1px solid #654321;
}

.static-calendar-table td {
  padding: 8px 6px;
  text-align: center;
  border: 1px solid #444;
  background: #2a2a2a;
  font-size: 0.85em;
  vertical-align: middle;
  transition: background 0.2s ease;
}

.static-calendar-table td:hover {
  background: rgba(191, 167, 106, 0.1);
}

/* Gün sütunu */
.static-calendar-table .day-column {
  background: rgba(139, 69, 19, 0.3);
  font-weight: 600;
  color: #ffd700;
}

/* Zaman sütunu */
.static-calendar-table .time-column {
  background: rgba(191, 167, 106, 0.2);
  color: #bfa76a;
  font-weight: 500;
}

/* Etkinlik hücreleri */
.event-cell {
  position: relative;
  cursor: pointer;
  min-height: 40px;
}

.event-cell .event-name {
  color: #fff;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.event-cell .event-reward {
  color: #ffd700;
  font-size: 0.75em;
  font-style: italic;
}

/* Etkinlik türlerine göre renkler */
.event-boss {
  background: linear-gradient(135deg, #8b0000, #a52a2a) !important;
}

.event-dungeon {
  background: linear-gradient(135deg, #4b0082, #6a5acd) !important;
}

.event-pvp {
  background: linear-gradient(135deg, #ff4500, #ff6347) !important;
}

.event-special {
  background: linear-gradient(135deg, #ffd700, #ffed4e) !important;
  color: #2c1810 !important;
}

.event-daily {
  background: linear-gradient(135deg, #228b22, #32cd32) !important;
}

/* ==================== AYLIK ETKİNLİK TAKVİMİ STİLLERİ ==================== */

.monthly-calendar-container {
  background: rgba(24, 24, 24, 0.9);
  border-radius: 10px;
  padding: 20px;
  border: 1px solid #bfa76a;
}

.monthly-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: linear-gradient(135deg, #8b4513, #a0522d);
  border-radius: 8px;
  color: #fff;
}

.month-navigation {
  display: flex;
  align-items: center;
  gap: 15px;
}

.month-nav-btn {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #bfa76a;
  color: #fff;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.month-nav-btn:hover {
  background: rgba(191, 167, 106, 0.3);
  transform: scale(1.05);
}

.current-month {
  font-size: 1.3em;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.monthly-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: #444;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.calendar-day-header {
  background: linear-gradient(135deg, #654321, #8b4513);
  color: #fff;
  padding: 12px 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9em;
}

.calendar-day {
  background: #2a2a2a;
  min-height: 100px;
  padding: 8px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.calendar-day:hover {
  background: rgba(191, 167, 106, 0.1);
  border-color: #bfa76a;
}

.calendar-day.other-month {
  background: #1a1a1a;
  opacity: 0.5;
}

.calendar-day.today {
  background: rgba(255, 215, 0, 0.2);
  border: 2px solid #ffd700;
}

.day-number {
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
  font-size: 0.9em;
}

.day-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mini-event {
  background: rgba(139, 69, 19, 0.8);
  color: #fff;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 0.7em;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
}

.mini-event:hover {
  background: rgba(191, 167, 106, 0.9);
}

/* ==================== ETKİNLİK DETAY TOOLTIP ==================== */

.event-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #bfa76a;
  font-size: 0.85em;
  z-index: 9999;
  max-width: 250px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.event-tooltip .tooltip-title {
  font-weight: 600;
  color: #ffd700;
  margin-bottom: 5px;
}

.event-tooltip .tooltip-time {
  color: #bfa76a;
  font-size: 0.9em;
  margin-bottom: 3px;
}

.event-tooltip .tooltip-reward {
  color: #90ee90;
  font-style: italic;
}

/* ==================== LEGEND (AÇIKLAMA) ==================== */

.calendar-legend {
  margin-top: 20px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid #444;
}

.legend-title {
  color: #ffd700;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 1.1em;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid #666;
}

/* ==================== RESPONSIVE TASARIM ==================== */

@media (max-width: 1200px) {
  .event-calendar-modal .modal-dialog {
    max-width: 95vw !important;
    width: 95vw !important;
    margin: 15px auto !important;
  }
}

@media (max-width: 768px) {
  .event-calendar-modal .modal-dialog {
    max-width: 98vw !important;
    width: 98vw !important;
    margin: 5px auto !important;
  }
  
  .static-calendar-table {
    font-size: 0.8em;
  }
  
  .static-calendar-table th,
  .static-calendar-table td {
    padding: 6px 4px;
  }
  
  .monthly-calendar-header {
    flex-direction: column;
    gap: 10px;
  }
  
  .calendar-day {
    min-height: 80px;
    padding: 4px;
  }
  
  .legend-items {
    flex-direction: column;
    gap: 8px;
  }
}

/* ==================== LOADING ANIMASYONU ==================== */

.calendar-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: #bfa76a;
  font-size: 1.1em;
}

.calendar-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #444;
  border-top: 3px solid #bfa76a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==================== HOVER EFEKTLER ==================== */

.event-cell:hover .event-name {
  color: #ffd700;
  transform: scale(1.05);
}

.calendar-day:hover .day-number {
  color: #ffd700;
}

/* ==================== ANİMASYONLAR ==================== */

.event-calendar-modal.fade .modal-dialog {
  transform: scale(0.8);
  transition: transform 0.3s ease-in-out;
}

.event-calendar-modal.show .modal-dialog {
  transform: scale(1);
}

.static-calendar-table,
.monthly-calendar-grid {
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
