/* ═══════════════════════════════════════════
   Grounded Aerial Calendar – Frontend Styles
   ═══════════════════════════════════════════ */

.gac-calendar-wrap {
  font-family: 'Josefin Sans', sans-serif;
  color: #1a1a2e;
  max-width: 100%;
  overflow: hidden;
}

/* ── Header / Nav ── */
.gac-cal-header {
  padding: 16px 20px;
}
.gac-cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.gac-cal-range {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
  min-width: 200px;
  text-align: center;
}
.gac-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #374151;
  text-decoration: none;
  font-size: 1.1rem;
  transition: background .2s, transform .15s;
}
.gac-nav-btn:hover { background: #e5e7eb; transform: scale(1.08); }

/* ── Scroll wrapper ── */
.gac-cal-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Table ── */
.gac-cal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 15px 15px;
  border: 0;
  background: none;
}

/* Time column */
.gac-time-col {
    width: 130px;
    min-width: 130px;
    padding: 0 !important;
    font-size: 16px;
    color: black;
    font-weight: 500;
    border: 1px solid black;
    border-radius: 5px;
}
.gac-time-label {
  white-space: nowrap;
  padding: 0;
  border: 0;
  height: auto;
}

/* Column header */
.gac-col-header {
  padding: 8px 8px;
  text-align: center;
  font-weight: 600;
  min-width: 120px;
  border: 0;
  border-radius: 5px;
}
.gac-col-day  {font-size: 16px;font-weight: 500;color: #000000;}
.gac-col-loc  {font-size: 16px;color: black;margin-top: -5px;font-weight: 500;}
.gac-col-date {font-size: 16px;color: #000000;margin-left: 22px;position: relative;}

/* Time rows */
.gac-time-row td {border: 0;}
.gac-time-row:hover td { background: #fafafa; }

/* Event cell */
.gac-col-cell {
  padding: 2px 4px;
  vertical-align: top;
  border-right: 0;
}
.gac-empty-cell {background: transparent;border: 1px solid #000000 !important;border-radius: 5px;}

/* Event card */
.gac-event-cell {
  background: var(--event-color);
  border-radius: 5px;
  padding: 15px 8px;
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
  transition: transform .15s, box-shadow .15s;
  position: relative;
  max-height: 100% !important;
  text-align: center;
}
.gac-event-cell.gac-bookable { cursor: pointer; }
.gac-event-cell.gac-bookable:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.gac-event-cell.gac-full {
  opacity: .65;
  background: #f5f5f5 !important;
  border-left-color: #bbb !important;
}

.gac-event-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
  margin-bottom: 2px;
}
.gac-event-cat {
  font-size: 15px;
  color: #4b5563;
  margin-bottom: 0;
}
.gac-event-meta {
}
.gac-badge {
  font-size: 12px;
  background: rgba(0,0,0,.12);
  color: #1a1a2e;
  padding: 5px 12px;
  border-radius: 10px;
  font-weight: 600;
}
.gac-badge-full { background: #fee2e2; color: #991b1b; }
.gac-badge-warn { background: #fef3c7; color: #92400e; }
.gac-event-price {
  font-size: 16px;
  font-weight: 700;
  color: #065f46;
  margin-top: 3px;
}

/* No events */
.gac-no-events {
  text-align: center;
  padding: 48px 20px;
  color: #9ca3af;
  font-size: .95rem;
}

/* ═══════════════════════════
   Booking Modal
   ═══════════════════════════ */
.gac-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
}
.gac-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: gac-modal-in .25s ease;
}
@keyframes gac-modal-in {
  from { opacity:0; transform:translateY(20px) scale(.97); }
  to   { opacity:1; transform:none; }
}
.gac-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  line-height: 1;
  padding: 4px;
  border-radius: 50%;
  transition: background .15s;
  z-index: 1;
}
.gac-modal-close:hover { background: #f3f4f6; }

/* Modal content built by JS */
.gac-modal-header {
  padding: 24px 24px 0;
}
.gac-modal-header h2 { margin: 0 0 4px; font-size: 1.2rem; }
.gac-modal-meta {
  font-size: .82rem;
  color: #6b7280;
  margin-bottom: 8px;
}
.gac-modal-meta span + span::before { content: ' · '; }
.gac-modal-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: #065f46;
  margin: 8px 0;
}
.gac-modal-avail { font-size: .8rem; color: #6b7280; margin-bottom: 16px; }
.gac-modal-avail.gac-low { color: #b45309; }

.gac-modal-body { padding: 16px 24px 24px; }
.gac-modal-body .gac-field { margin-bottom: 14px; }
.gac-modal-body label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}
.gac-modal-body input[type=text],
.gac-modal-body input[type=email],
.gac-modal-body input[type=tel],
.gac-modal-body textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: .875rem;
  box-sizing: border-box;
  transition: border-color .15s;
  font-family: inherit;
}
.gac-modal-body input:focus,
.gac-modal-body textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.gac-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gac-modal-body .gac-submit-btn {
  width: 100%;
  padding: 13px;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s;
  margin-top: 8px;
  font-family: inherit;
}
.gac-modal-body .gac-submit-btn:hover { background: #4f46e5; transform: translateY(-1px); }
.gac-modal-body .gac-submit-btn:disabled { background: #9ca3af; cursor: not-allowed; transform: none; }
.gac-error-msg { color: #dc2626; font-size: .82rem; margin-top: 10px; text-align: center; }
.gac-success-msg {
  text-align: center;
  padding: 24px;
}
.gac-success-msg .gac-check {
  font-size: 3rem;
  margin-bottom: 12px;
}
.gac-success-msg h3 { margin: 0 0 8px; color: #065f46; }
.gac-success-msg p  { color: #6b7280; font-size: .875rem; }

/* Loading spinner */
.gac-loading { text-align: center; padding: 40px; color: #6b7280; }
.gac-spinner {
  width: 32px; height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: gac-spin .7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes gac-spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 640px) {
  .gac-time-col   { width: 65px; }
  .gac-time-label { font-size: .65rem; padding: 3px 6px; }
  .gac-col-header { min-width: 90px; padding: 8px 4px; }
  .gac-col-day    { font-size: .75rem; }
  .gac-col-loc    { font-size: .62rem; }
  .gac-event-title { font-size: .7rem; }
  .gac-modal       { border-radius: 12px 12px 0 0; max-height: 95vh; }
  .gac-modal-overlay { align-items: flex-end; padding: 0; }
  .gac-field-row  { grid-template-columns: 1fr; }
}

.gac-time-label span {
    font-size: 16px;
    color: black;
    font-weight: 400;
    border: 1px solid black;
    display: block;
    text-align: center;
    border-radius: 5px;
    margin: 0;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gac-col-date:before {
    content: "";
    width: 10px;
    height: 1px;
    position: absolute;
    background-color: black;
    left: -15px;
    top: 7px;
}
