/**
 * Raicor Open Hours - Modern Responsive Styling
 * Desktop & Mobile optimized
 */

/* =================================
   MODULE TITLE
   ================================= */
/* Zentriere den Joomla Modultitel - speziell für card-header */
h3.card-header,
h2.card-header,
h4.card-header,
.card-header {
  text-align: center !important;
}

/* Weitere gängige Modul-Titel Container */
.moduletable h3,
.moduletable h2,
.moduletable h4,
.module-title,
h3.page-header,
.sidebar h3,
aside h3,
.widget h3,
[class*="module"] > h3,
[class*="module"] > h2 {
  text-align: center !important;
}

/* Für Joomla 5 Card-Layouts */
.card-body h3:first-child,
.card-body h2:first-child {
  text-align: center !important;
}

/* =================================
   COMPACT LAYOUT (default.php)
   ================================= */
.raicor-openhours--compact {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.75rem 0;
  max-width: 100%;
}

.raicor-openhours__info {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0; /* Allow text truncation */
}

/* Badge */
.raicor-openhours__badge {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Status & Info elements */
.raicor-openhours__status-sub {
  font-size: 0.875rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.raicor-openhours__today {
  font-size: 0.875rem;
  line-height: 1.5;
}

.raicor-openhours__note {
  font-size: 0.875rem;
  line-height: 1.4;
  padding: 0.25rem 0.65rem;
  border-radius: 0.375rem;
}

/* =================================
   TABLE LAYOUT (table.php)
   ================================= */
.raicor-openhours--table {
  max-width: 100%;
  width: 100%;
}

.raicor-openhours__header {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* Table styling */
.raicor-openhours__table {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.raicor-openhours__table tbody tr {
  transition: background-color 0.15s ease;
}

.raicor-openhours__table th {
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #dee2e6;
}

.raicor-openhours__table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #dee2e6;
}

/* Today highlight */
.raicor-openhours__table .table-active {
  background-color: rgba(13, 110, 253, 0.08) !important;
}

/* Hint/Footer */
.raicor-openhours__hint {
  font-size: 0.8rem;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
}

/* =================================
   RESPONSIVE - MOBILE
   ================================= */
@media (max-width: 767px) {
  /* Compact Layout Mobile */
  .raicor-openhours--compact {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0;
  }
  
  .raicor-openhours__badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
  }
  
  .raicor-openhours__info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    width: 100%;
  }
  
  .raicor-openhours__status-sub,
  .raicor-openhours__today,
  .raicor-openhours__note {
    font-size: 0.8rem;
  }
  
  /* Table Layout Mobile */
  .raicor-openhours__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
  }
  
  .raicor-openhours__table {
    font-size: 0.85rem;
  }
  
  .raicor-openhours__table th,
  .raicor-openhours__table td {
    padding: 0.5rem 0.5rem;
  }
  
  .raicor-openhours__table th {
    width: 50% !important;
    font-size: 0.85rem;
  }
  
  .raicor-openhours__hint {
    font-size: 0.75rem;
  }
}

/* =================================
   RESPONSIVE - TABLET
   ================================= */
@media (min-width: 768px) and (max-width: 991px) {
  .raicor-openhours__table {
    font-size: 0.9rem;
  }
  
  .raicor-openhours__table th {
    width: 45%;
  }
}

/* =================================
   RESPONSIVE - DESKTOP
   ================================= */
@media (min-width: 992px) {
  .raicor-openhours--compact {
    padding: 1rem 0;
  }
  
  .raicor-openhours__table {
    max-width: 600px;
  }
  
  .raicor-openhours__table th {
    width: 40%;
  }
}

/* =================================
   DARK MODE SUPPORT
   ================================= */
[data-bs-theme="dark"] .raicor-openhours__table tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .raicor-openhours__table tr.table-active {
  background-color: rgba(13, 110, 253, 0.2) !important;
}

[data-bs-theme="dark"] .raicor-openhours__hint {
  background-color: rgba(255, 255, 255, 0.05);
}