/* WoW Raid Calendar - WordPress Theme Compatible */

.wow-raid-calendar-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 15px;
  font-family: inherit;
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
}

/* Header */
.raid-calendar-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #2d3142 0%, #3d3f52 100%);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  border-top: 3px solid #c41e3a;
}

.raid-calendar-title {
  color: #e8eaf0 !important;
  font-size: clamp(1.5rem, 4vw, 2rem) !important;
  margin: 0 0 15px 0 !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  font-weight: bold !important;
  line-height: 1.2 !important;
}

/* View Toggle Buttons */
.raid-view-toggle {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.raid-view-btn {
  padding: 10px 20px;
  background: rgba(196, 30, 58, 0.2);
  border: 2px solid #c41e3a;
  color: #e8eaf0;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.3s;
  font-weight: 600;
}

.raid-view-btn:hover {
  background: rgba(196, 30, 58, 0.4);
  transform: translateY(-2px);
  border-color: #ff4757;
}

.raid-view-btn.active {
  background: #c41e3a;
  color: #ffffff;
  border-color: #ff4757;
}

/* Loading State */
.raid-loading {
  text-align: center;
  padding: 60px 20px;
  color: #e8eaf0;
}

.raid-spinner {
  border: 4px solid rgba(196, 30, 58, 0.2);
  border-top: 4px solid #c41e3a;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: raid-spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes raid-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.raid-error {
  background: rgba(255, 0, 0, 0.1);
  border: 2px solid #ff4444;
  color: #ff6666;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  margin: 20px 0;
}

/* Calendar Content */
.raid-calendar-content {
  background: #1a1c24;
  padding: 20px;
  border-radius: 8px;
  min-height: 400px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Dark theme support */
body.dark-mode .raid-calendar-content,
.dark-theme .raid-calendar-content {
  background: #1a1c24;
}

/* List View */
.raid-events-list {
  display: grid;
  gap: 20px;
}

.raid-event-card {
  background: #23252f;
  border-radius: 10px;
  padding: 20px;
  border-left: 4px solid #c41e3a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.3s;
}

body.dark-mode .raid-event-card,
.dark-theme .raid-event-card {
  background: #23252f;
  color: #e8eaf0;
}

.raid-event-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.raid-event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.raid-event-title {
  font-size: 1.4em;
  color: #c41e3a;
  font-weight: bold;
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.raid-event-date {
  background: rgba(196, 30, 58, 0.2);
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 0.9em;
  color: #c41e3a;
  font-weight: 600;
  white-space: nowrap;
}

.raid-event-description {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.6;
}

body.dark-mode .raid-event-description,
.dark-theme .raid-event-description {
  color: #b8bcc8;
}

.raid-event-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.raid-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-size: 0.95em;
}

body.dark-mode .raid-info-item,
.dark-theme .raid-info-item {
  color: #9ca3af;
}

.raid-info-item strong {
  color: #c41e3a;
}

.raid-signup-stats {
  display: flex;
  gap: 15px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
}

body.dark-mode .raid-signup-stats,
.dark-theme .raid-signup-stats {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.raid-stat {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 10px;
  background: rgba(196, 30, 58, 0.1);
  border-radius: 5px;
}

.raid-stat-number {
  font-size: 1.5em;
  color: #c41e3a;
  font-weight: bold;
}

.raid-stat-label {
  font-size: 0.8em;
  color: #666;
  margin-top: 5px;
}

body.dark-mode .raid-stat-label,
.dark-theme .raid-stat-label {
  color: #9ca3af;
}

/* Calendar Grid View */
.raid-calendar-grid {
  background: #1a1c24;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

body.dark-mode .raid-calendar-grid,
.dark-theme .raid-calendar-grid {
  background: #1a1c24;
}

.raid-calendar-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(196, 30, 58, 0.3);
  flex-wrap: wrap;
  gap: 15px;
}

.raid-calendar-nav button {
  background: rgba(196, 30, 58, 0.15);
  border: 2px solid rgba(196, 30, 58, 0.5);
  color: #e8eaf0;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
}

.raid-calendar-nav button:hover {
  background: rgba(196, 30, 58, 0.3);
  border-color: #c41e3a;
  color: #ffffff;
}

.raid-calendar-month {
  font-size: 1.5em;
  color: #e8eaf0;
  font-weight: bold;
}

.raid-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 10px;
}

.raid-weekday {
  text-align: center;
  padding: 10px;
  color: #c41e3a;
  font-weight: bold;
  font-size: 0.9em;
}

.raid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.raid-day {
  aspect-ratio: 1;
  padding: 10px;
  background: #23252f;
  border-radius: 5px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
  color: #b8bcc8;
  border: 1px solid rgba(196, 30, 58, 0.15);
}

body.dark-mode .raid-day,
.dark-theme .raid-day {
  background: #23252f;
  color: #b8bcc8;
}

.raid-day:hover {
  background: rgba(196, 30, 58, 0.1);
}

.raid-day.other-month {
  opacity: 0.3;
}

.raid-day.today {
  background: rgba(196, 30, 58, 0.25);
  border: 2px solid rgba(196, 30, 58, 0.6);
  font-weight: bold;
  color: #e8eaf0;
}

.raid-day.has-event {
  background: rgba(196, 30, 58, 0.15);
}

.raid-day-number {
  font-weight: bold;
  margin-bottom: 5px;
}

.raid-day-events {
  font-size: 0.7em;
  color: #c41e3a;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 5px;
}

.raid-event-preview {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.raid-event-title-mini {
  font-size: 0.85em;
  color: #e8eaf0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.raid-event-dot {
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

/* Compact Card View */
.raid-compact-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.raid-compact-card {
  background: #2d3142;
  border-radius: 10px;
  padding: 15px;
  border-top: 3px solid #c41e3a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
}

body.dark-mode .raid-compact-card,
.dark-theme .raid-compact-card {
  background: #2d3142;
  color: #e8eaf0;
}

.raid-compact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.raid-compact-title {
  color: #c41e3a;
  font-size: 1.2em;
  margin-bottom: 10px;
  font-weight: bold;
}

.raid-compact-time {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 10px;
}

body.dark-mode .raid-compact-time,
.dark-theme .raid-compact-time {
  color: #9ca3af;
}

.raid-compact-signups {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .raid-compact-signups,
.dark-theme .raid-compact-signups {
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .raid-calendar-title {
    font-size: 1.5em !important;
  }
  
  .raid-view-toggle {
    width: 100%;
  }
  
  .raid-view-btn {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    font-size: 0.9em;
  }
  
  .raid-event-header {
    flex-direction: column;
  }
  
  .raid-event-title {
    font-size: 1.2em;
  }
  
  .raid-event-info {
    grid-template-columns: 1fr;
  }
  
  .raid-signup-stats {
    flex-wrap: wrap;
  }
  
  .raid-calendar-grid-header {
    flex-direction: column;
    text-align: center;
  }
  
  .raid-compact-view {
    grid-template-columns: 1fr;
  }
  
  .raid-weekday {
    font-size: 0.8em;
    padding: 5px;
  }
  
  .raid-day {
    padding: 5px;
    font-size: 0.85em;
  }
}

@media (max-width: 480px) {
  .raid-calendar-header {
    padding: 15px;
  }
  
  .raid-calendar-content {
    padding: 15px;
  }
  
  .raid-event-card {
    padding: 15px;
  }
}

/* WordPress Block Editor Support */
.wp-block .wow-raid-calendar-container {
  margin: 1.5em 0;
}

/* Elementor Compatibility */
.elementor-widget-container .wow-raid-calendar-container {
  margin: 0;
}

/* ========================================
   RESPONSIVE STYLES FOR MOBILE
   ======================================== */

@media (max-width: 768px) {
  .wow-raid-calendar-container {
    padding: 0 8px;
    margin: 10px 0;
    max-width: 100vw;
    width: 100%;
  }
  
  .raid-calendar-header {
    padding: 15px 8px;
    margin-bottom: 15px;
    box-sizing: border-box;
  }
  
  .raid-calendar-title {
    font-size: 1.5rem !important;
  }
  
  .raid-calendar-content {
    padding: 8px;
  }
  
  .raid-calendar-grid {
    padding: 8px;
  }
  
  .raid-days {
    gap: 2px;
  }
  
  .raid-weekdays {
    gap: 2px;
  }
  
  .raid-calendar-grid-header {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
  }
  
  .raid-calendar-month {
    font-size: 1.2em;
    order: -1;
  }
  
  .raid-calendar-nav {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
  }
  
  .raid-calendar-nav button {
    padding: 6px 12px;
    font-size: 0.9em;
    flex: 1;
  }
  
  .raid-weekday {
    font-size: 0.65em;
    padding: 3px 1px;
  }
  
  .raid-days {
    gap: 3px;
  }
  
  .raid-day {
    padding: 4px;
    min-height: 55px;
    font-size: 0.9em;
    aspect-ratio: auto; /* Remove fixed aspect ratio on mobile */
  }
  
  .raid-day-number {
    font-size: 0.85em;
  }
  
  .raid-event-title-mini {
    font-size: 0.6em;
    max-width: 100%;
    overflow: hidden;
  }
  
  .raid-event-dot {
    width: 6px;
    height: 6px;
  }
}

@media (max-width: 480px) {
  .wow-raid-calendar-container {
    padding: 0 3px;
    margin: 5px 0;
  }
  
  .raid-calendar-grid {
    padding: 3px;
  }
  
  .raid-calendar-content {
    padding: 3px;
  }
  
  .raid-calendar-title {
    font-size: 1.1rem !important;
  }
  
  .raid-calendar-month {
    font-size: 0.9em;
  }
  
  .raid-calendar-nav button {
    padding: 4px 6px;
    font-size: 0.7em;
  }
  
  .raid-days {
    gap: 1px;
  }
  
  .raid-weekdays {
    gap: 1px;
  }
  
  .raid-day {
    padding: 1px;
    min-height: 38px;
    font-size: 0.75em;
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
  }
  
  .raid-day-number {
    font-size: 0.7em;
  }
  
  .raid-weekday {
    font-size: 0.5em;
    padding: 1px 0;
  }
  
  .raid-event-title-mini {
    display: none;
  }
  
  .raid-event-dot {
    width: 5px;
    height: 5px;
  }
}
