/*
 * File: calendar/info.css
 * Project: avrora26
 * Role: Booking calendar "top section" styles (guests, dates, sum, book button)
 * Used in: calendar/index.php
 * Depends on: calendar/index.php markup
 * Author: Team Avrora
 * Last updated: 13.02.2026
 */


.top-section {
  max-width: 840px;
  margin: 0 auto 20px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 20px;
  font-family: Arial, sans-serif;
  color: #333333;
}

.top-section .category-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: #222222;
  margin-bottom: 20px;
  text-align: left;
}


.top-section .info-section {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 20px;
}

.top-section .guests-section {
  position: relative;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid rgba(43, 174, 139, 0.45);
  border-radius: 8px;
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 66%);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.12);
}

.top-section .guests-section::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 10px;
  bottom: 10px;
  width: 5px;
  border-radius: 0 6px 6px 0;
  background: #2BAE8B;
}

.top-section .guests-section--attention {
  border-color: rgba(255, 127, 111, 0.78);
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 66%);
  animation: guests-attention-pulse 1.45s ease-in-out 2;
}

.top-section .guests-section--attention::before {
  background: #ff7f6f;
}

.guests-section__main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.guests-section__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.guests-section__label {
  color: #0f766e;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.guests-section__tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  background: rgba(255, 127, 111, 0.14);
  color: #b45309;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  padding: 4px 8px;
}

.guests-section__value {
  color: #111827;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.1;
}

.guests-section__hint {
  color: #4b5563;
  font-size: 0.92rem;
  line-height: 1.3;
}

.top-section .guests-section__button {
  margin-left: 0;
  flex: 0 0 auto;
  padding: 11px 18px;
  border-color: rgba(43, 174, 139, 0.55);
  background: #2BAE8B;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(43, 174, 139, 0.22);
}

.top-section .guests-section__button:hover {
  color: #ffffff;
  background: #219975;
  border-color: rgba(33, 153, 117, 0.78);
}

@keyframes guests-attention-pulse {
  0%, 100% {
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.12);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(255, 127, 111, 0.18), 0 16px 28px rgba(255, 127, 111, 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-section .guests-section--attention {
    animation: none;
  }
}

.top-section .info-section label {
  font-size: 0.95rem;
  color: #555555;
  min-width: 90px;
}


.top-section .link-btn {
  margin-left: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(43, 174, 139, 0.35);
  background: rgba(43, 174, 139, 0.08);
  color: #2BAE8B;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.top-section .link-btn:hover {
  color: #219975;
  background: rgba(43, 174, 139, 0.14);
  border-color: rgba(43, 174, 139, 0.5);
  transform: translateY(-1px);
}

.top-section .link-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(43, 174, 139, 0.18);
}


.top-section .info-section input[type="number"] {
  padding: 8px 12px;
  border: 1px solid #dddddd;
  border-radius: 4px;
  font-size: 0.95rem;
  width: 130px;
  background: #fafafa;
  transition: border 0.2s, background 0.2s;
}

.top-section .info-section input[type="number"]:focus {
  outline: none;
  border-color: #2BAE8B;
  background: #ffffff;
}


.top-section .info-section input[type="text"] {
  padding: 8px 12px;
  border: 1px solid #dddddd;
  border-radius: 4px;
  font-size: 0.95rem;
  width: 130px;
  background: #fafafa;
  transition: border 0.2s, background 0.2s;
}

.top-section .info-section input[type="text"]:focus {
  outline: none;
  border-color: #2BAE8B;
  background: #ffffff;
}

.top-section .info-section input[type="text"][readonly] {
  background: #f0f0f0;
  cursor: default;
}


.top-section .sum-section {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: baseline;
}

.top-section .sum-section .total-label {
  font-size: 0.95rem;
  color: #555555;
  min-width: 90px;
}

.top-section .sum-section #totalSum {
  font-weight: 700;
  color: #2BAE8B;
  font-size: 1rem;
  white-space: nowrap;
}

.top-section .sum-section .currency {
  font-size: 1rem;
  color: #2BAE8B;
  white-space: nowrap;
}

.top-section .price-breakdown {
  width: min(420px, 100%);
  margin: -8px auto 14px;
  padding: 10px 14px;
  border: 1px solid rgba(43, 174, 139, 0.28);
  border-radius: 10px;
  background: #f5fffc;
  box-shadow: 0 8px 18px rgba(43, 174, 139, 0.08);
}

.top-section .price-breakdown__row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #3f4b4b;
  font-size: 0.92rem;
  line-height: 1.35;
}

.top-section .price-breakdown__row + .price-breakdown__row {
  margin-top: 6px;
}

.top-section .price-breakdown__row strong {
  color: #1f2a2a;
  font-weight: 800;
  white-space: nowrap;
}

.top-section .price-breakdown__row--discount span,
.top-section .price-breakdown__row--discount strong {
  color: #0f8b72;
}

.top-section .price-breakdown__row--total {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(43, 174, 139, 0.22);
}

.top-section .price-breakdown__row--total span,
.top-section .price-breakdown__row--total strong {
  color: #00796b;
  font-size: 1rem;
}


.top-section #bookBtn {
  background: #2BAE8B;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.25s, box-shadow 0.25s;
}

.top-section #bookBtn:hover {
  background: #219975;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}


@media (max-width: 600px) {
  .top-section {
    padding: 15px;
  }

  .top-section .info-section {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 15px;
  }

  .top-section .guests-section {
    gap: 12px;
    padding: 13px 14px 14px 16px;
  }

  .guests-section__value {
    font-size: 1.45rem;
  }

  .top-section .guests-section__button {
    width: 100%;
    text-align: center;
  }

  .top-section .info-section label {
    min-width: auto;
  }

  .top-section .info-section input[type="number"],
  .top-section .info-section input[type="text"] {
    width: 100%;
    max-width: none;
  }

  .top-section .sum-section {
    flex-direction: row;
    gap: 5px;
  }

  .top-section .sum-section #totalSum,
  .top-section .sum-section .currency {
    white-space: nowrap;
  }

  .top-section .price-breakdown {
    margin-top: -4px;
  }

  .top-section .price-breakdown__row {
    align-items: flex-start;
  }

  .top-section #bookBtn {
    width: 100%;
  }

  .top-section .link-btn {
    margin-left: 0;
    align-self: flex-start;
  }
}

/* Guests modal validation (calendar/index.php) */
#children-inputs select.select-error {
  border-color: rgba(239,68,68,0.95) !important;
  box-shadow: 0 0 0 4px rgba(239,68,68,0.14) !important;
}

/* Guests modal capacity error (calendar) */
.occupancy-error {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.35;
}

#occupancy-modal input.input-error {
  border-color: rgba(239, 68, 68, 0.95) !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14) !important;
}
