/* =====================================================
   Charter Boat Booking – Public Styles  (v2 calendar)
   ===================================================== */

/* Base */
.cbb-booking-wrap { max-width: 900px; margin: 0 auto; font-family: inherit; }
.cbb-heading      { font-size: 1.8rem; margin-bottom: 20px; color: #1e3a5f; }
.cbb-no-trips     { color: #6b7280; font-style: italic; }

/* ── View Toggle ── */
.cbb-view-toggle  { display: flex; gap: 8px; margin-bottom: 20px; }
.cbb-toggle-btn   {
    padding: 8px 20px; border-radius: 20px; font-size: .9rem; font-weight: 600;
    cursor: pointer; border: 2px solid #1e3a5f; background: #fff; color: #1e3a5f;
    transition: all .15s;
}
.cbb-toggle-btn.active,
.cbb-toggle-btn:hover { background: #1e3a5f; color: #fff; }

/* ══════════════════════════════════════════
   CALENDAR
   ══════════════════════════════════════════ */
.cbb-cal-legend {
    display: flex; gap: 16px; align-items: center;
    font-size: .82rem; color: #6b7280; margin-bottom: 12px;
}
.cbb-legend-dot {
    display: inline-block; width: 10px; height: 10px; border-radius: 50%;
    margin-right: 4px; vertical-align: middle;
}
.cbb-cal-nav {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.cbb-cal-month-label { font-size: 1.15rem; font-weight: 700; color: #1e3a5f; }
.cbb-cal-prev, .cbb-cal-next {
    background: none; border: 2px solid #1e3a5f; border-radius: 8px;
    padding: 4px 14px; font-size: 1.1rem; cursor: pointer; color: #1e3a5f;
    transition: all .15s;
}
.cbb-cal-prev:hover, .cbb-cal-next:hover { background: #1e3a5f; color: #fff; }
.cbb-cal-prev:disabled, .cbb-cal-next:disabled { opacity: .3; cursor: default; pointer-events: none; }
.cbb-cal-grid-wrap {
    background: #fff; border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08); overflow: hidden;
}
.cbb-cal-dow-row {
    display: grid; grid-template-columns: repeat(7, 1fr);
    background: #1e3a5f;
}
.cbb-cal-dow {
    text-align: center; padding: 10px 0;
    font-size: .78rem; font-weight: 700; color: #fff; text-transform: uppercase;
    letter-spacing: .05em;
}
.cbb-cal-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.cbb-cal-day {
    position: relative; min-height: 64px; padding: 8px 6px 6px;
    border-right: 1px solid #f3f4f6; border-bottom: 1px solid #f3f4f6;
    transition: background .15s; cursor: default;
}
.cbb-cal-day:nth-child(7n) { border-right: none; }
.cbb-cal-empty  { background: #fafafa; }
.cbb-cal-past   { background: #fafafa; }
.cbb-cal-past .cbb-cal-day-num { color: #d1d5db; }
.cbb-cal-today .cbb-cal-day-num {
    background: #1e3a5f; color: #fff; border-radius: 50%;
    width: 24px; height: 24px; display: inline-flex;
    align-items: center; justify-content: center;
}
.cbb-cal-has-trip  { cursor: pointer; background: #eff6ff; }
.cbb-cal-has-trip:hover { background: #dbeafe; }
.cbb-cal-soldout   { background: #fff7ed; cursor: pointer; }
.cbb-cal-soldout:hover { background: #ffedd5; }
.cbb-cal-day-num {
    font-size: .85rem; font-weight: 600; color: #374151;
    line-height: 24px; display: inline-block;
}
.cbb-cal-dot {
    display: block; width: 8px; height: 8px; border-radius: 50%;
    margin: 4px auto 0;
}
.cbb-dot-avail { background: #10b981; }
.cbb-dot-sold  { background: #f59e0b; }

/* Day panel */
.cbb-day-panel {
    margin-top: 16px; background: #fff; border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.1); overflow: hidden;
    animation: cbb-panel-in .2s ease;
}
@keyframes cbb-panel-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cbb-day-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px; background: #1e3a5f; color: #fff; font-size: 1rem;
}
.cbb-day-panel-close {
    background: none; border: none; color: #fff; font-size: 1.4rem;
    cursor: pointer; line-height: 1; padding: 0 4px;
}
#cbb-day-panel-trips { padding: 16px 20px; }
.cbb-panel-trip {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 10px;
    padding: 14px 0; border-bottom: 1px solid #f3f4f6;
}
.cbb-panel-trip:last-child { border-bottom: none; }
.cbb-panel-trip-info h4 { margin: 0 0 4px; color: #1e3a5f; font-size: 1rem; }
.cbb-panel-trip-info p  { margin: 2px 0; font-size: .85rem; color: #6b7280; }
.cbb-panel-avail        { font-weight: 600; color: #059669; }
.cbb-panel-avail.low    { color: #dc2626; }
.cbb-panel-sold         { font-weight: 600; color: #92400e; }

/* ══════════════════════════════════════════
   LIST VIEW
   ══════════════════════════════════════════ */
.cbb-trips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}
.cbb-trip-card {
    background: #fff; border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1); overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.cbb-trip-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.cbb-trip-card.cbb-sold-out { opacity: .7; }
.cbb-trip-image img { width: 100%; height: 180px; object-fit: cover; display: block; }
.cbb-trip-body  { padding: 20px; }
.cbb-trip-title { font-size: 1.1rem; margin: 0 0 10px; color: #1e3a5f; }
.cbb-trip-meta  { margin: 4px 0; color: #4b5563; font-size: .88rem; }
.cbb-seats      { font-weight: 600; color: #059669; }
.cbb-low-seats  { color: #dc2626 !important; }
.cbb-trip-desc  { font-size: .875rem; color: #6b7280; margin: 10px 0; }

/* Buttons */
.cbb-book-btn, .cbb-panel-book-btn {
    display: block; width: 100%; margin-top: 14px;
    padding: 11px; background: #1e3a5f; color: #fff;
    border: none; border-radius: 8px; font-size: .95rem;
    cursor: pointer; font-weight: 600; transition: background .2s; text-align: center;
}
.cbb-panel-book-btn { width: auto; padding: 10px 20px; white-space: nowrap; margin-top: 0; flex-shrink: 0; }
.cbb-book-btn:hover, .cbb-panel-book-btn:hover { background: #2563eb; }

/* ══════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════ */
.cbb-modal {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center; padding: 16px;
}
.cbb-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.cbb-modal-content {
    position: relative; background: #fff; border-radius: 16px;
    padding: 32px; width: 100%; max-width: 540px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25); z-index: 1;
}
.cbb-modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #9ca3af; }
.cbb-modal-close:hover { color: #111; }
.cbb-modal-content h3 { margin: 0 0 6px; color: #1e3a5f; font-size: 1.3rem; }
.cbb-modal-trip-name  { color: #2563eb; font-weight: 600; margin: 0 0 20px; }
.cbb-form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cbb-form-group { display: flex; flex-direction: column; margin-bottom: 16px; }
.cbb-form-group label { font-size: .875rem; font-weight: 600; margin-bottom: 6px; color: #374151; }
.cbb-form-group input, .cbb-form-group textarea {
    padding: 10px 12px; border: 1.5px solid #d1d5db; border-radius: 8px;
    font-size: .95rem; transition: border-color .15s; font-family: inherit;
}
.cbb-form-group input:focus, .cbb-form-group textarea:focus { outline: none; border-color: #2563eb; }
.cbb-submit-btn {
    width: 100%; padding: 14px; background: #1e3a5f; color: #fff;
    border: none; border-radius: 8px; font-size: 1rem;
    font-weight: 600; cursor: pointer; transition: background .2s; margin-top: 4px;
}
.cbb-submit-btn:hover    { background: #2563eb; }
.cbb-submit-btn:disabled { opacity: .6; cursor: not-allowed; }
.cbb-error   { background: #fee2e2; color: #991b1b; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; font-size: .9rem; }
.cbb-success { text-align: center; padding: 20px 0; }
.cbb-success-icon { font-size: 3rem; display: block; margin-bottom: 12px; }
.cbb-success p    { font-size: 1rem; color: #065f46; font-weight: 500; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .cbb-cal-day     { min-height: 46px; padding: 5px 3px 4px; }
    .cbb-cal-day-num { font-size: .72rem; }
    .cbb-cal-dow     { font-size: .62rem; padding: 7px 0; }
    .cbb-form-row    { grid-template-columns: 1fr; }
    .cbb-modal-content { padding: 24px 18px; }
    .cbb-panel-trip  { flex-direction: column; align-items: flex-start; }
    .cbb-panel-book-btn { width: 100%; }
}
