/* ==========================================================================
   WS-VERFÜGBARKEITS-AMPEL · Frontend Styles
   Isolierte CSS-Stile für Header-Badge, Ampel-Karte & Status-Pulse
   ========================================================================== */

/* 1. Header Mini-Ampel (Pill / Status-Badge) */
.ws-ampel-header-badge,
.header-mini-ampel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid #E8DFD8;
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.2;
  color: #372B25;
  box-shadow: 0 2px 10px rgba(55, 43, 37, 0.05);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  cursor: pointer !important;
}

.ws-ampel-header-badge:hover,
.header-mini-ampel:hover {
  background: #ECFDF5;
  border-color: #16A34A;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.22);
  transform: translateY(-2px);
}

.ws-ampel-header-badge .mini-ampel-arrow,
.header-mini-ampel .mini-ampel-arrow {
  display: inline-block;
  font-size: 0.88rem;
  color: #16A34A;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  opacity: 0.65;
  margin-left: 3px;
}

.ws-ampel-header-badge:hover .mini-ampel-arrow,
.header-mini-ampel:hover .mini-ampel-arrow {
  transform: translateX(4px);
  opacity: 1;
}

.ws-ampel-header-badge .ws-mini-dot,
.header-mini-ampel .mini-ampel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.ws-ampel-header-badge.ws-status-green .ws-mini-dot,
.header-mini-ampel.status-green .mini-ampel-dot {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
  animation: wsAmpelMiniPulse 2s infinite;
}

.ws-ampel-header-badge.ws-status-yellow .ws-mini-dot,
.header-mini-ampel.status-yellow .mini-ampel-dot {
  background: #eab308;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.8);
  animation: wsAmpelMiniPulse 2s infinite;
}

.ws-ampel-header-badge.ws-status-red .ws-mini-dot,
.header-mini-ampel.status-red .mini-ampel-dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  animation: wsAmpelMiniPulse 2s infinite;
}

@keyframes wsAmpelMiniPulse {
  0% { transform: scale(0.95); opacity: 0.85; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.85; }
}

.ws-ampel-header-badge .ws-mini-text,
.header-mini-ampel .mini-ampel-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ws-ampel-header-badge .ws-mini-title,
.header-mini-ampel .mini-ampel-text strong {
  font-weight: 700;
  color: #2B231E;
}

.ws-ampel-header-badge .ws-title-mobile,
.header-mini-ampel .ws-title-mobile {
  display: none !important;
}

.ws-ampel-header-badge .ws-title-desktop,
.header-mini-ampel .ws-title-desktop {
  display: inline !important;
}

.ws-ampel-header-badge .ws-mini-sub,
.header-mini-ampel .mini-ampel-sub {
  color: #7B716A;
  font-weight: 500;
}

/* Seamless morphing transition: Verfügbarkeit -> Freie Kapazitäten für Neukunden */
.ws-ampel-morph-box {
  display: inline-block !important;
  overflow: hidden !important;
  position: relative !important;
  height: 1.35em !important;
  line-height: 1.35em !important;
  vertical-align: middle !important;
}
.ws-ampel-morph-track {
  display: flex !important;
  flex-direction: column !important;
  animation: wsAmpelSeamlessMorph 6.5s cubic-bezier(0.65, 0, 0.35, 1) infinite !important;
}
.ws-ampel-morph-slide {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: 1.35em !important;
  line-height: 1.35em !important;
  white-space: nowrap !important;
}
@keyframes wsAmpelSeamlessMorph {
  0%, 38% {
    transform: translateY(0);
    opacity: 1;
  }
  44% {
    opacity: 0.15;
  }
  50%, 88% {
    transform: translateY(-50%);
    opacity: 1;
  }
  94% {
    opacity: 0.15;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 1460px) {
  .ws-ampel-header-badge .ws-mini-sub,
  .header-mini-ampel .mini-ampel-sub {
    display: none;
  }
}

@media (max-width: 768px) {
  .ws-ampel-header-badge .ws-title-desktop,
  .header-mini-ampel .ws-title-desktop {
    display: none !important;
  }
  .ws-ampel-header-badge .ws-title-mobile,
  .header-mini-ampel .ws-title-mobile {
    display: inline !important;
  }
}

/* 2. Kompakter Status-Pill ([ws_ampel_badge]) */
.ws-ampel-badge,
.ampel-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FAF8F5;
  border: 1px solid #E8DFD8;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #372B25;
}

.ws-ampel-badge.ampel-green,
.ampel-badge.ampel-green {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
  color: #166534;
}

.ws-ampel-badge.ampel-yellow,
.ampel-badge.ampel-yellow {
  border-color: rgba(217, 119, 6, 0.35);
  background: rgba(245, 158, 11, 0.08);
  color: #92400E;
}

.ws-ampel-badge.ampel-red,
.ampel-badge.ampel-red {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #991B1B;
}

.ws-ampel-badge .ampel-dot,
.ampel-badge .ampel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ws-ampel-badge.ampel-green .ampel-dot,
.ampel-badge.ampel-green .ampel-dot {
  background: #22c55e;
}

.ws-ampel-badge.ampel-yellow .ampel-dot,
.ampel-badge.ampel-yellow .ampel-dot {
  background: #f59e0b;
}

.ws-ampel-badge.ampel-red .ampel-dot,
.ampel-badge.ampel-red .ampel-dot {
  background: #ef4444;
}

/* 3. Große Verfügbarkeits-Ampel Card ([ws_ampel_box]) */
.ws-ampel-card,
.ampel-card {
  background: #ffffff;
  border-radius: 20px;
  border: 2px solid #E8DFD8;
  padding: 30px 32px;
  box-shadow: 0 10px 30px rgba(55, 43, 37, 0.08);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  margin: 20px 0;
  font-family: inherit;
  box-sizing: border-box;
}

.ws-ampel-card.ampel-green,
.ampel-card.ampel-green {
  border-color: rgba(34, 197, 94, 0.45);
  background: linear-gradient(180deg, #FFFFFF 0%, rgba(34, 197, 94, 0.03) 100%);
}

.ws-ampel-card.ampel-yellow,
.ampel-card.ampel-yellow {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(180deg, #FFFFFF 0%, rgba(245, 158, 11, 0.03) 100%);
}

.ws-ampel-card.ampel-red,
.ampel-card.ampel-red {
  border-color: rgba(239, 68, 68, 0.45);
  background: linear-gradient(180deg, #FFFFFF 0%, rgba(239, 68, 68, 0.03) 100%);
}

.ws-ampel-card .ampel-header,
.ampel-card .ampel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(232, 223, 216, 0.7);
}

.ws-ampel-card .ampel-status-indicator,
.ampel-card .ampel-status-indicator {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ws-ampel-card .ampel-dot,
.ampel-card .ampel-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.ws-ampel-card.ampel-green .ampel-dot,
.ampel-card.ampel-green .ampel-dot {
  background: #22c55e;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.7);
  animation: wsAmpelPulseGreen 2.2s infinite;
}

.ws-ampel-card.ampel-yellow .ampel-dot,
.ampel-card.ampel-yellow .ampel-dot {
  background: #f59e0b;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.7);
  animation: wsAmpelPulseYellow 2.2s infinite;
}

.ws-ampel-card.ampel-red .ampel-dot,
.ampel-card.ampel-red .ampel-dot {
  background: #ef4444;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.7);
  animation: wsAmpelPulseRed 2.2s infinite;
}

@keyframes wsAmpelPulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes wsAmpelPulseYellow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

@keyframes wsAmpelPulseRed {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.ws-ampel-card .ampel-status-titles,
.ampel-card .ampel-status-titles {
  display: flex;
  flex-direction: column;
}

.ws-ampel-card .ampel-status-label,
.ampel-card .ampel-status-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #7B716A;
  margin-bottom: 2px;
}

.ws-ampel-card .ampel-title,
.ampel-card .ampel-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #2B231E;
  line-height: 1.25;
}

.ws-ampel-card .ampel-date-badge,
.ampel-card .ampel-date-badge {
  background: #FAF8F5;
  border: 1px solid #E8DFD8;
  color: #7B716A;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ws-ampel-card .ampel-date-badge:empty,
.ampel-card .ampel-date-badge:empty {
  display: none !important;
}

.ws-ampel-card .ampel-body,
.ampel-card .ampel-body {
  margin-bottom: 24px;
}

.ws-ampel-card .ampel-region,
.ampel-card .ampel-region {
  font-size: 0.95rem;
  color: #8C4B3E;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.ws-ampel-card .ampel-desc,
.ampel-card .ampel-desc {
  font-size: 1.02rem;
  line-height: 1.6;
  color: #4A3E37;
  margin: 0;
}

.ws-ampel-card .ampel-highlights-list,
.ampel-card .ampel-highlights-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ws-ampel-card .ampel-highlights-list li,
.ampel-card .ampel-highlights-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.94rem;
  line-height: 1.5;
  color: #372B25;
}

.ws-ampel-card .ampel-check,
.ampel-card .ampel-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: #16A34A;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.ws-ampel-card .ampel-footer,
.ampel-card .ampel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(232, 223, 216, 0.7);
}

.ws-ampel-card .ampel-cta-btn,
.ampel-card .ampel-cta-btn {
  display: flex !important;
  width: 100% !important;
  justify-content: center !important;
  text-align: center !important;
  align-items: center !important;
  gap: 8px !important;
  background: #A87D6F !important;
  background-color: #A87D6F !important;
  color: #ffffff !important;
  padding: 13px 28px !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  text-decoration: none !important;
  border: 2px solid transparent !important;
  box-shadow: 0 4px 14px rgba(168, 125, 111, 0.28) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

.ws-ampel-card .ampel-cta-btn:hover,
.ampel-card .ampel-cta-btn:hover {
  background: #8C4B3E !important;
  background-color: #8C4B3E !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(140, 75, 62, 0.38) !important;
}

.ws-ampel-card .ampel-reassurance,
.ampel-card .ampel-reassurance {
  font-size: 0.85rem;
  color: #7B716A;
  font-style: italic;
  max-width: 440px;
}

/* 4. Minimaler Inline-Status ([pflege_ampel style="minimal"]) */
.ws-ampel-minimal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #E8DFD8;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #372B25;
}

.ws-ampel-minimal .ampel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.ws-ampel-minimal.ampel-green .ampel-dot {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
  animation: wsAmpelPulseGreen 2s infinite;
}

.ws-ampel-minimal.ampel-yellow .ampel-dot {
  background: #eab308;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.7);
  animation: wsAmpelPulseYellow 2s infinite;
}

.ws-ampel-minimal.ampel-red .ampel-dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
  animation: wsAmpelPulseRed 2s infinite;
}
