/**
 * ferry-enhance.css — Visual enhancements for ferrytimetable.co.nz
 *
 * Upload via cPanel File Manager to root.
 * Add before </head> on each page:
 *
 *   <link rel="stylesheet" href="/ferry-enhance.css">
 *
 * Works alongside existing styles. Does not override core layout.
 */


/* ═══════════════════════════════════════════════
   0. ANZAC DAY POPPY BANNER
   Auto-removed at midnight by ferry-enhance.js
   ═══════════════════════════════════════════════ */

.fte-anzac-banner {
  background: #2c1215;
  padding: 10px 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: fte-anzac-fade-in 0.6s ease-out;
  border-top: 1px solid #4a2023;
}

.fte-anzac-banner__text {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.5px;
}

/* CSS-only poppy */
.fte-poppy {
  width: 22px;
  height: 22px;
  position: relative;
  flex-shrink: 0;
}

.fte-poppy__petal {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #dc2626;
  border-radius: 50% 50% 50% 0;
}

.fte-poppy__petal:nth-child(1) {
  top: 0; left: 4px;
  transform: rotate(-10deg);
}
.fte-poppy__petal:nth-child(2) {
  top: 1px; right: 1px;
  transform: rotate(70deg);
}
.fte-poppy__petal:nth-child(3) {
  bottom: 2px; right: 2px;
  transform: rotate(150deg);
}
.fte-poppy__petal:nth-child(4) {
  bottom: 1px; left: 2px;
  transform: rotate(220deg);
}

.fte-poppy__centre {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #2c1215;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #4a2023;
}

/* Stem (for the leaf) */
.fte-poppy__stem {
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 1.5px;
  height: 6px;
  background: #166534;
  transform: translateX(-50%);
}

@keyframes fte-anzac-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}


/* ═══════════════════════════════════════════════
   1. DATE HEADER — shows current date above timetable
   ═══════════════════════════════════════════════ */

.fte-date-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
}

.fte-date-header__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid, #546e7a);
}

.fte-date-header__day {
  font-size: 12px;
  color: var(--text-light, #90a4ae);
}


/* ═══════════════════════════════════════════════
   2. PUBLIC HOLIDAY NOTICE
   ═══════════════════════════════════════════════ */

.fte-holiday-notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #1e40af;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.fte-holiday-notice__icon {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  margin-top: 5px;
}

.fte-holiday-notice strong {
  font-weight: 700;
}


/* ═══════════════════════════════════════════════
   3. CANCELLATION BANNER with auto-advance
   ═══════════════════════════════════════════════ */

.fte-cancel-banner {
  background: #fef2f2;
  border-left: 3px solid #dc2626;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin-bottom: 16px;
  animation: fte-slide-in 0.3s ease-out;
}

.fte-cancel-banner__title {
  font-size: 14px;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 4px;
}

.fte-cancel-banner__detail {
  font-size: 13px;
  color: #b91c1c;
  margin-bottom: 8px;
}

.fte-cancel-banner__next {
  display: inline-block;
  background: #f0fdf4;
  color: #166534;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid #bbf7d0;
}

@keyframes fte-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ═══════════════════════════════════════════════
   4. ENHANCED STATUS BADGES (alongside existing frt- badges)
   ═══════════════════════════════════════════════ */

.fte-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  vertical-align: middle;
  margin-left: 6px;
}

.fte-status--ok {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.fte-status--delayed {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.fte-status--cancelled {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}


/* ═══════════════════════════════════════════════
   5. ROW STATES — past, next, cancelled
   ═══════════════════════════════════════════════ */

.fte-row--past td {
  color: var(--text-light, #90a4ae) !important;
  font-weight: 400 !important;
}

.fte-row--next {
  background: rgba(0, 184, 169, 0.10) !important;
}

.fte-row--next td {
  font-weight: 800 !important;
  color: var(--navy, #0c2340) !important;
  font-size: 15px !important;
}

.fte-row--next td:first-child {
  border-left: 3px solid var(--teal, #00b8a9);
  padding-left: 9px;
}

.fte-row--cancelled-enhanced td {
  opacity: 0.45;
  text-decoration: line-through;
  text-decoration-color: #dc2626;
}

.fte-row--cancelled-enhanced td:last-child {
  opacity: 1;
  text-decoration: none;
}


/* ═══════════════════════════════════════════════
   6. FOOTER QUIP — dry wit personality
   ═══════════════════════════════════════════════ */

.fte-quip {
  text-align: center;
  font-size: 12px;
  color: var(--text-light, #90a4ae);
  font-style: italic;
  margin-top: 16px;
  padding: 8px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}


/* ═══════════════════════════════════════════════
   7. NEXT DEPARTURE ENHANCEMENT
   ═══════════════════════════════════════════════ */

.fte-next-quip {
  font-size: 12px;
  color: var(--text-light, #90a4ae);
  font-style: italic;
  margin-top: 6px;
}

.fte-next-cancelled {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(220, 38, 38, 0.3);
}

.fte-next-cancelled__text {
  font-size: 12px;
  color: #b91c1c;
  font-weight: 600;
}

.fte-next-cancelled__alt {
  font-size: 12px;
  color: #166534;
  margin-top: 2px;
}


/* ═══════════════════════════════════════════════
   8. RESPONSIVE
   ═══════════════════════════════════════════════ */

@media (max-width: 480px) {
  .fte-cancel-banner {
    padding: 10px 12px;
  }

  .fte-holiday-notice {
    padding: 10px 12px;
    font-size: 12px;
  }

  .fte-date-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}
