/**
 * Global Facility Services GmbH - Holiday Popup Stylesheet
 * Fully Responsive, Mobile-First Luxury UI (320px to 4K)
 */

/* ==========================================================================
   Base Backdrop & Container
   ========================================================================== */
.gfs-holiday-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top, 16px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
  padding-left: max(16px, env(safe-area-inset-left, 16px));
  padding-right: max(16px, env(safe-area-inset-right, 16px));
  background: rgba(5, 13, 26, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  box-sizing: border-box;
}

.gfs-holiday-backdrop.gfs-holiday-active {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   Modal Card
   ========================================================================== */
.gfs-holiday-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: min(90vh, 640px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, #0f2547 0%, #08162b 60%, #040d1a 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.75), 0 0 35px rgba(14, 165, 233, 0.12);
  color: #FFFFFF;
  overflow: hidden;
  transform: translateY(24px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  box-sizing: border-box;
}

.gfs-holiday-backdrop.gfs-holiday-active .gfs-holiday-card {
  transform: translateY(0) scale(1);
}

/* Swiss National Day Special Glow (1. August) */
.gfs-holiday-card[data-holiday-key="nationalfeiertag"] {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 25px 65px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(220, 38, 38, 0.22);
}

/* ==========================================================================
   Close Button (Touch-optimized min 44x44px)
   ========================================================================== */
.gfs-holiday-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #E2E8F0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.2s ease, transform 0.15s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.gfs-holiday-close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.2;
}

.gfs-holiday-close:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  transform: scale(1.05);
}

.gfs-holiday-close:active {
  transform: scale(0.95);
}

.gfs-holiday-close:focus-visible {
  outline: 2px solid #A3E635;
  outline-offset: 2px;
}

/* ==========================================================================
   Header Illustration Image
   ========================================================================== */
.gfs-holiday-header {
  position: relative;
  width: 100%;
  height: 175px;
  min-height: 150px;
  flex-shrink: 0;
  background: #071529;
  overflow: hidden;
}

.gfs-holiday-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gfs-holiday-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(15, 37, 71, 0.95) 100%);
  pointer-events: none;
}

/* ==========================================================================
   Body Content (Smooth Scrollable on short screens)
   ========================================================================== */
.gfs-holiday-body {
  padding: 22px 26px 20px 26px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

/* Badge */
.gfs-holiday-badge-wrap {
  margin-bottom: 10px;
}

.gfs-holiday-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(163, 230, 53, 0.14);
  color: #BEF264;
  border: 1px solid rgba(163, 230, 53, 0.3);
}

.gfs-holiday-card[data-holiday-key="nationalfeiertag"] .gfs-holiday-badge {
  background: rgba(239, 68, 68, 0.18);
  color: #FCA5A5;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Title */
.gfs-holiday-title {
  margin: 0 0 12px 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

/* Message Text */
.gfs-holiday-text {
  margin: 0 0 18px 0;
  font-size: 0.92rem;
  line-height: 1.62;
  color: #CBD5E1;
  font-weight: 400;
}

/* Footer Info & Button */
.gfs-holiday-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gfs-holiday-brand {
  font-size: 0.76rem;
  font-weight: 600;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 5px;
}

.gfs-holiday-btn {
  background: linear-gradient(135deg, #A3E635 0%, #84CC16 100%);
  color: #0F172A;
  border: none;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.15s ease;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.gfs-holiday-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(163, 230, 53, 0.35);
}

.gfs-holiday-btn:active {
  transform: translateY(1px);
}

.gfs-holiday-btn:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

/* ==========================================================================
   Mobile-First Responsiveness & Viewport Breakpoints
   ========================================================================== */

/* Very Small Smartphones (320px - 360px, e.g. iPhone SE 1st gen) */
@media (max-width: 360px) {
  .gfs-holiday-backdrop {
    padding: 10px;
  }
  .gfs-holiday-card {
    border-radius: 16px;
    max-height: 92vh;
  }
  .gfs-holiday-header {
    height: 135px;
    min-height: 120px;
  }
  .gfs-holiday-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
  .gfs-holiday-body {
    padding: 16px 16px 16px 16px;
  }
  .gfs-holiday-title {
    font-size: 1.15rem;
    margin-bottom: 8px;
  }
  .gfs-holiday-text {
    font-size: 0.85rem;
    line-height: 1.55;
    margin-bottom: 14px;
  }
  .gfs-holiday-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .gfs-holiday-btn {
    width: 100%;
  }
}

/* Standard Smartphones (361px - 480px, e.g. iPhone 12/13/14/15, Pixel, Galaxy) */
@media (min-width: 361px) and (max-width: 480px) {
  .gfs-holiday-header {
    height: 155px;
  }
  .gfs-holiday-body {
    padding: 18px 20px 18px 20px;
  }
  .gfs-holiday-title {
    font-size: 1.25rem;
  }
  .gfs-holiday-text {
    font-size: 0.89rem;
  }
}

/* Landscape on Smartphones (Short vertical space < 500px) */
@media (max-height: 500px) {
  .gfs-holiday-card {
    max-height: 94vh;
    flex-direction: row;
    max-width: 620px;
  }
  .gfs-holiday-header {
    width: 40%;
    height: auto;
    min-height: 100%;
  }
  .gfs-holiday-body {
    width: 60%;
    padding: 18px;
  }
  .gfs-holiday-close {
    top: 8px;
    right: 8px;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .gfs-holiday-backdrop,
  .gfs-holiday-card,
  .gfs-holiday-close,
  .gfs-holiday-btn {
    transition: none !important;
    animation: none !important;
  }
}
