/* ═══════════════════════════════════════════════════════════
   Ponui Campsite Bookings — Frontend Styles
   ═══════════════════════════════════════════════════════════ */

/* ── Wrapper ── */
.ponui-wrap {
    max-width: 960px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
}

/* ── Legend ── */
.ponui-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.ponui-legend-item {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 14px;
    border-radius: 20px;
    color: #fff;
}
.ponui-legend-available { background: #27ae60; }
.ponui-legend-pending   { background: #e67e22; }
.ponui-legend-booked    { background: #c0392b; }
.ponui-legend-blackout  { background: #7f8c8d; }

/* ── FullCalendar overrides ── */
#ponui-calendar,
#ponui-avail-calendar {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.fc .fc-toolbar-title          { font-size: 1.2rem; font-weight: 600; }
.fc .fc-button                 { border-radius: 4px !important; }
.fc .fc-button-primary         { background: #2c6e4f !important; border-color: #2c6e4f !important; }
.fc .fc-button-primary:hover   { background: #1e5038 !important; border-color: #1e5038 !important; }
.fc .fc-button-primary.fc-button-active { background: #1e5038 !important; border-color: #1e5038 !important; }
.fc-day-today                  { background: #f0faf4 !important; }
.fc-event                      { border-radius: 3px !important; font-size: 12px !important; cursor: pointer; }
.fc-event:hover                { opacity: .85; }
.fc-daygrid-day-number         { color: #333; text-decoration: none !important; }

/* Pointer cursor on future dates in availability calendar */
#ponui-avail-calendar .fc-daygrid-day { cursor: pointer; }
#ponui-avail-calendar .fc-day-past    { cursor: default; }

/* ── Calendar hint line ── */
.ponui-calendar-hint {
    text-align: center;
    color: #888;
    font-size: 13px;
    margin: 10px 0 0;
    font-style: italic;
}

/* ══════════════════════════════════════════════════════════════
   Inline booking form section
   ══════════════════════════════════════════════════════════════ */
.ponui-booking-section {
    background: #fff;
    border-radius: 10px;
    border: 2px solid #e8f5ee;
    padding: 30px 36px;
    margin-top: 32px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    transition: border-color .3s, box-shadow .3s;
}

/* Flash highlight when a calendar date is clicked */
@keyframes ponuiSectionPulse {
    0%   { border-color: #2c6e4f; box-shadow: 0 0 0 4px rgba(44,110,79,.2); }
    60%  { border-color: #2c6e4f; box-shadow: 0 0 0 4px rgba(44,110,79,.2); }
    100% { border-color: #e8f5ee; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
}
.ponui-booking-section--highlight {
    animation: ponuiSectionPulse 1.4s ease forwards;
}

.ponui-booking-section__header {
    border-bottom: 1px solid #e8f5ee;
    padding-bottom: 16px;
    margin-bottom: 22px;
}
.ponui-booking-section__header h2 {
    margin: 0 0 6px;
    font-size: 22px;
    color: #2c3e50;
}
.ponui-booking-section__header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* ── Availability page intro ── */
.ponui-availability-intro {
    background: #f0faf4;
    border-left: 4px solid #2c6e4f;
    border-radius: 0 6px 6px 0;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #2c3e50;
}
.ponui-availability-intro p { margin: 0; }

/* ── Availability CTA ── */
.ponui-avail-cta {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.ponui-avail-cta__hint {
    font-size: 13px;
    color: #888;
    font-style: italic;
}

/* ══════════════════════════════════════════════════════════════
   Buttons
   ══════════════════════════════════════════════════════════════ */
.ponui-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, opacity .15s;
    line-height: 1.4;
    font-family: inherit;
}
.ponui-btn--primary        { background: #2c6e4f; color: #fff; }
.ponui-btn--primary:hover  { background: #1e5038; color: #fff; }
.ponui-btn--secondary      { background: #ecf0f1; color: #333; }
.ponui-btn--secondary:hover{ background: #d5dbdb; }
.ponui-btn--approve        { background: #27ae60; color: #fff; }
.ponui-btn--approve:hover  { background: #1e8449; }
.ponui-btn--decline        { background: #c0392b; color: #fff; }
.ponui-btn--decline:hover  { background: #96281b; }
.ponui-btn--lg             { padding: 14px 32px; font-size: 17px; }
.ponui-btn:disabled        { opacity: .6; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════════
   Form layout
   ══════════════════════════════════════════════════════════════ */
.ponui-inline-form { }

.ponui-form-row {
    margin-bottom: 18px;
}
.ponui-form-row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.ponui-form-row--third {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}
.ponui-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #444;
}
.ponui-req { color: #c0392b; }

.ponui-checkout-note {
    font-weight: 400;
    font-size: 12px;
    color: #888;
    margin-left: 4px;
}
.ponui-checkout-display {
    padding: 9px 12px;
    background: #f8f9fa;
    border: 1.5px solid #e0e0e0;
    border-radius: 5px;
    font-size: 15px;
    color: #888;
    min-height: 42px;
    display: flex;
    align-items: center;
}
.ponui-checkout-display--filled {
    color: #2c3e50;
    font-weight: 500;
    background: #f0faf4;
    border-color: #a8d5bc;
}

.ponui-form-row input[type="text"],
.ponui-form-row input[type="email"],
.ponui-form-row input[type="tel"],
.ponui-form-row input[type="date"],
.ponui-form-row input[type="number"],
.ponui-form-row textarea,
.ponui-form-row select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
    color: #333;
    background: #fff;
}
.ponui-form-row input:focus,
.ponui-form-row textarea:focus {
    outline: none;
    border-color: #2c6e4f;
    box-shadow: 0 0 0 3px rgba(44,110,79,.12);
}

.ponui-form-actions {
    margin-top: 22px;
}
.ponui-privacy-note {
    font-size: 12px;
    color: #999;
    margin-top: 12px;
    margin-bottom: 0;
}

/* ══════════════════════════════════════════════════════════════
   Alerts
   ══════════════════════════════════════════════════════════════ */
.ponui-alert {
    padding: 12px 16px;
    border-radius: 5px;
    font-size: 14px;
    margin-top: 12px;
}
.ponui-alert--success { background: #d5f5e3; color: #1e8449; border: 1px solid #a9dfbf; }
.ponui-alert--error   { background: #fadbd8; color: #922b21; border: 1px solid #f1948a; }
.ponui-alert--info    { background: #d6eaf8; color: #1a5276; border: 1px solid #85c1e9; }

/* ══════════════════════════════════════════════════════════════
   Approval page
   ══════════════════════════════════════════════════════════════ */
.ponui-approval-page h2 { margin-bottom: 6px; }
.ponui-booking-summary {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
}
.ponui-booking-summary h3 { margin-top: 0; }
.ponui-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.ponui-detail-table th,
.ponui-detail-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
    text-align: left;
    vertical-align: top;
}
.ponui-detail-table th {
    width: 35%;
    font-weight: 600;
    color: #555;
    background: #f1f3f5;
}
.ponui-action-panel {
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
}
.ponui-action-panel--active {
    border-color: #2c6e4f;
    background: #f0faf4;
}
.ponui-action-panel h4    { margin-top: 0; }
.ponui-action-panel label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.ponui-action-panel textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
    margin-bottom: 12px;
    display: block;
}
.ponui-action-panel textarea:focus {
    outline: none;
    border-color: #2c6e4f;
}

/* ══════════════════════════════════════════════════════════════
   Admin calendar  (wp-admin pages)
   ══════════════════════════════════════════════════════════════ */
#ponui-admin-calendar {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
/* Admin detail modal — inline styled in PHP, just ensure flex centering works */
#ponui-detail-modal,
#ponui-decline-modal,
#ponui-approve-modal {
    align-items: center;
    justify-content: center;
}

/* ══════════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 680px) {
    .ponui-form-row--half,
    .ponui-form-row--third  { grid-template-columns: 1fr; }
    .ponui-booking-section  { padding: 20px 18px; }
    .ponui-btn--lg          { width: 100%; text-align: center; display: block; }
    .ponui-legend           { gap: 7px; }
    .ponui-avail-cta        { flex-direction: column; align-items: flex-start; gap: 8px; }
}
