/* ============================================
   ШРИФТИ
   ============================================ */

@font-face {
  font-family: 'e-Ukraine';
  src: url('/fonts/e-Ukraine-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: light;
}

@font-face {
  font-family: 'e-Ukraine';
  src: url('/fonts/e-Ukraine-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'e-Ukraine';
  src: url('/fonts/e-Ukraine-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: medium;
}

@font-face {
  font-family: 'e-Ukraine';
  src: url('/fonts/e-UkraineHead-LOGO.woff2') format('woff2');
  font-weight: 600;
  font-style: bold;
}


/* ============================================
   ГЛОБАЛЬНІ СТИЛІ
   ============================================ */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'e-Ukraine', sans-serif;
  font-weight: 400;
  font-size: 15px;
  color: #1A244D;
}

button, input, select, textarea {
  font-family: inherit;
}

/* Glass ефект */
.glass {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #ffffffbd;
}

/* Посилання */
a {
  color: inherit;
}

a:visited {
  color: inherit;
}

/* ============================================
   ТИПОГРАФІКА
   ============================================ */

h1 {
  font-size: 20px;
  font-weight: 500;
  margin: 0;
  line-height: 1.3;
}

h2 {
  font-size: 24px;
  font-weight: 500;
  margin: 0;
  line-height: 1.2;
}

.body-1 {
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

.body-2 {
  font-size: 13px;
  line-height: 1.5;
  color: #686E8D;
  margin: 0;
}

.black-text {
  color: #000 !important;
} 

.grey-text {
  color: #686E8D !important;
}

/* ============================================
   УТИЛІТИ
   ============================================ */

.floating {
  box-shadow: 0 0 2px #1A244D20, 0 4px 20px #1A244D20;
}

.error {
  margin: 0px;
  font-size: 13px;
  color: #FA5E5E;
  display: none;
}


/* ============================================
   МАПА
   ============================================ */

#map-wrapper {
  position: fixed;
  width: 100%;
  height: 100svh;  
}

#map {
  width: 100%;
  height: 100svh;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.map-ready #map {
  opacity: 1;
}


/* ============================================
   ЛОАДЕР КАРТИ
   ============================================ */

#map-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: #F5F3E9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.vegetable-animation {
  width: 80px;
  height: 80px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vegetable {
  position: absolute;
  width: 80px;
  height: 80px;
  object-fit: contain;
  opacity: 0;
  transform: scale(1) translateY(0);
}

.vegetable.active {
  opacity: 1;
}

.vegetable.leaving {
  animation: leaveVegetable 0.2s ease-out forwards;
}

@keyframes leaveVegetable {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
  }
}

.loading-text {
  font-size: 16px;
  color: #958D78;
  font-weight: 300;
  text-align: center;
  animation: pulse 2.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ============================================
   DONATION BOX
   ============================================ */

.donation-box {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min-content; 
  max-width: calc(100vw - 48px); 
  border-radius: 12px;
  padding: 16px 32px;
  font-size: 14px;
  color: #1A244D;
  z-index: 10;
  box-sizing: border-box;
  text-align: center;
  pointer-events: auto;
}

donation-box p{
  font-weight: 400;
}

.donation-box a {
  color: #0033FF;
  text-decoration: none;
  transition: all 0.1s ease;
}

.donation-box a:hover {
  text-decoration: underline 1.8px;
}

/* ============================================
   UI ЕЛЕМЕНТИ
   ============================================ */

.fair-ui {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

/* Лого */
.logo-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 24px;
  background: white;
  border-radius: 12px;
}

.logo {
  display: flex;
  align-items: center;
  padding: 0;
  gap: 10px;
  font-weight: 500;
  font-size: 28px;
  color: #0A1543;
}

.logo-mark {
  content: "";
  display: inline-block;
  width: 29px;
  height: 34px;
  background-image: url('/media/icons/logo-icon.svg');
  background-size: contain;
  background-repeat: no-repeat;
  vertical-align: middle;
}

/* Контейнер контролів */
.controls-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Панель днів тижня */
.weekday-panel {
  background: white;
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 15px;
  font-weight: 400;
  height: auto;
  max-height: 1000px;
  opacity: 100%;
  transform: translateY(0%);
  pointer-events: auto;
  transition: all 0.2s ease;
}


/* ============================================
   КНОПКИ
   ============================================ */

.button {
  background: #fff;
  color: #1A244D;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  box-sizing: border-box;
  text-decoration: none;
}

/* Кнопки днів тижня */
.weekday-today {
  min-width: 180px;
}

.weekday-button,
.weekday-today {
  text-align: left;
  background: none;
  color: #1A244D;
  font-family: inherit;
  justify-content: flex-start;
}

.weekday-button:hover:not(.active):not(.disabled),
.weekday-today:hover:not(.active):not(.disabled) {
  background: #F2F2F3;
  color: #0033FF;
}

.weekday-button.active,
.weekday-today.active {
  background: #0033FF;
  color: #fff;
}

.weekday-button.active:hover,
.weekday-today.active:hover {
  background: #F2EB3C;
  color: #1A244D;
}

.weekday-button.disabled,
.weekday-today.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Main button */
.main-button {
  background: #0033FF;
  color: #fff;
}

.main-button:hover {
  background: #0022CC;
  color: #fff;
}


/* ============================================
   ФОРМИ
   ============================================ */

label {
  font-weight: 400;
  font-size: 13px;
  color: #1A244D90;
  letter-spacing: 0.3px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  max-height: 100%;
}

.input-group label {
  color: #0033FF;
}

.input-group input,
.input-group textarea {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  border: none;
  background-color: #1A244D10;
}

.input-group input:focus,
.input-group input:focus-visible,
.input-group textarea:focus,
.input-group textarea:focus-visible {
  outline: none;
  border: none;
  background-color: #1A244D10;
  box-shadow: inset 0 0 0 1px #1A244D20;
}

.input-group textarea {
  resize: none;
}

input::placeholder,
textarea::placeholder {
  color: #1A244D70;
}

.input-group input:focus::placeholder,
.input-group input:focus-visible::placeholder,
.input-group textarea:focus::placeholder,
.input-group textarea:focus-visible::placeholder {  
  color: #1A244D40;
}


/* ============================================
   ПОПАПИ MAPBOX (на карті)
   ============================================ */

.mapboxgl-popup {
  max-width: 420px !important;
  font-family: 'e-Ukraine', sans-serif;
  font-size: 14px;
  pointer-events: none;
}

.mapboxgl-popup .mapboxgl-popup-content {
  background: #fff;
  border-radius: 12px;
  padding: 14px 20px 16px 20px;
  box-shadow: 0 0 2px #1A244D20, 0 4px 20px #1A244D20;
  pointer-events: auto;
  overscroll-behavior: none;
}

.mapboxgl-popup-tip {
  border-top-color: white;
  margin-top: -1px;
}

.mapboxgl-popup-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: -1px !important;
}

/* Контент попапу */
.popup-address {
  font-weight: 400;
  font-size: 16px;
  line-height: 140%;
  color: #1A244D;
  text-decoration: underline;
  transition: text-decoration 0.2s ease, color 0.2s ease;
}

.popup-address:hover {
  text-decoration: none !important;
  color: #1A244D;
}

.popup-details {
  font-weight: 300;
  font-size: 14px;
  line-height: 180%;
  color: #1A244D70;
}

.popup-date,
.popup-weekday {
  display: block;
}

.highlight {
  color: #1A244D;
}

/* Попапи зон */
.mapboxgl-popup.zone-popup-wrapper {
  max-width: 180px !important;
}

.mapboxgl-popup.zone-popup-wrapper .mapboxgl-popup-content {
  background: #ffffffac;
  border: 1px solid #ffffffbd;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 10px 14px;
  gap: 0;
  box-shadow: 0 0 2px #1A244D20, 0 4px 20px #1A244D20;
}

.mapboxgl-popup.zone-popup-wrapper .mapboxgl-popup-tip {
  display: none !important; 
}

.mapboxgl-popup.zone-popup-wrapper .zone-popup-title {
  font-size: 14px !important;
  font-weight: 300 !important;
  margin: 0 !important;
  color: #1A244D !important;
  line-height: 1.3 !important;
  text-align: center !important;
}


/* ============================================
   ОФСКРІН ІНДИКАТОРИ
   ============================================ */

#offscreen-indicators .indicator {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #0033FF;
  border-radius: 50%;
  border: none;
  transform-origin: center center;
  box-sizing: border-box;
}


/* ============================================
   МОДАЛЬНІ ВІКНА
   ============================================ */

/* Підложка */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.visible {
  display: flex !important;
  opacity: 1;
}

/* Контейнер */
.modal-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  max-height: 90vh;
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  transform: translateY(5%);
  opacity: 0;
  transition: transform 0.2s ease-out, opacity 0.12s ease-out;
  display: flex;
  flex-direction: column;
}

.modal-overlay.visible .modal-container {
  transform: translateY(0);
  opacity: 1;
}

/* Кнопка закриття */
.modal-close {
  position: absolute;
  top: 4px;
  right: 4px;
  background: transparent;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  color: #686E8D;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  color: #333;
  background: #f5f5f5;
}

/* Body */
.modal-body {
  padding: 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  flex-shrink: 0;
}

.modal-body a {
  color: #0033FF;
  text-decoration: none;
  transition: all 0.1s ease;
}

.modal-body a:hover {
  text-decoration: underline 2px;
}

.modal-body p {
  color: #686E8D; 
}

/* About - специфіка */
#about-modal {
  max-height: 80vh;
}

.about-illustration {
  padding: 0 24px;
  display: flex;
  justify-content: center;
  background: #ffffff;
  flex-shrink: 1;
  min-height: 0;
}

.about-illustration img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.about-footer {
  padding-top: 24px;
  border-top: 1px solid #d2d2d7;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about-footer a {
  color: #686E8D;
  text-decoration: underline 1.5px;
  transition: all 0.1s ease;
}

.about-footer a:hover {
  text-decoration: none;
}

/* Feedback - специфіка */
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}