/* ═══════════════════════════════════════════════════
   Resource Booking Manager — Public Styles v3
   ═══════════════════════════════════════════════════ */

.rbm-booking-wrap {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    line-height: 1.5;
    box-shadow: 0 4px 32px rgba(0,0,0,0.10);
    border-radius: 14px;
    overflow: hidden;
}

/* ══════════════════════
   HEADER
══════════════════════ */
.rbm-header {
    background: linear-gradient(135deg, #1a6b5a 0%, #0d4a3a 100%) !important;
    padding: 28px 32px !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin: 0 !important;
    border: none !important;
}
.rbm-header-icon {
    font-size: 40px;
    line-height: 1;
    flex-shrink: 0;
}
.rbm-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    border: none !important;
    text-shadow: none !important;
    letter-spacing: -0.3px;
}
.rbm-subtitle {
    font-size: 14px !important;
    color: rgba(255,255,255,0.78) !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ══════════════════════
   CALENDAR SECTION
══════════════════════ */
.rbm-calendar-section {
    background: #f8fafc;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    padding: 24px 28px;
}

.rbm-legend {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.rbm-legend-dot {
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 3px;
    margin-right: 5px;
    vertical-align: middle;
}
.rbm-dot-booked { background: #f87171; }
.rbm-dot-free   { background: #86efac; }
.rbm-dot-today  { background: #fbbf24; }

/* 3-column grid */
.rbm-three-cal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Loading state */
.rbm-cal-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 28px;
    color: #94a3b8;
    font-size: 14px;
    font-style: italic;
}

/* ── Mini Calendar ── */
.rbm-mini-cal {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.rbm-mini-cal-header {
    background: #1a6b5a;
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 8px;
    letter-spacing: 0.2px;
}
.rbm-mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 6px;
    gap: 2px;
}
.rbm-mc-dayname {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    padding: 4px 0 6px;
    letter-spacing: 0.5px;
}
.rbm-mc-cell {
    text-align: center;
    font-size: 12px;
    padding: 5px 2px;
    border-radius: 5px;
    cursor: default;
    font-weight: 500;
    line-height: 1.2;
    transition: background 0.1s;
}
.rbm-mc-empty {
    background: transparent;
}
.rbm-mc-past {
    color: #cbd5e1;
}
.rbm-mc-free {
    color: #166534;
    background: #f0fdf4;
}
.rbm-mc-free:hover {
    background: #bbf7d0;
}
.rbm-mc-booked {
    background: #fee2e2;
    color: #991b1b;
    font-weight: 600;
    position: relative;
}
.rbm-mc-booked::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #ef4444;
    border-radius: 50%;
}
.rbm-mc-today {
    background: #fef3c7 !important;
    color: #92400e !important;
    font-weight: 700;
    border: 1.5px solid #fbbf24;
}

@media (max-width: 680px) {
    .rbm-three-cal-grid {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 681px) and (max-width: 820px) {
    .rbm-three-cal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ══════════════════════
   FORM
══════════════════════ */
.rbm-form {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 14px 14px;
    padding: 28px 32px 32px;
}

.rbm-form-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}
.rbm-form-section-label:first-child {
    margin-top: 0;
}

.rbm-field {
    margin-bottom: 16px;
}
.rbm-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.rbm-field input,
.rbm-field select,
.rbm-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    background: #f8fafc;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s, background .15s;
    -webkit-appearance: none;
    appearance: none;
}
.rbm-select-wrap {
    position: relative;
}
.rbm-select-wrap::after {
    content: '▾';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    font-size: 14px;
}
.rbm-select-wrap select {
    padding-right: 36px;
}
.rbm-field input:focus,
.rbm-field select:focus,
.rbm-field textarea:focus {
    outline: none;
    border-color: #1a6b5a;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(26,107,90,0.12);
}
.rbm-field textarea {
    resize: vertical;
    min-height: 100px;
}
.rbm-required { color: #dc2626; margin-left: 2px; }
.rbm-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ── Price Card ── */
#rbm-price-summary { margin: 4px 0 20px; }
.rbm-price-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid #a7f3d0;
    box-shadow: 0 2px 8px rgba(26,107,90,0.08);
}
.rbm-price-card-header {
    background: #1a6b5a;
    padding: 13px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.rbm-price-card-title {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.2px;
}
.rbm-price-card-body {
    background: #f0fdf9;
    padding: 16px 18px;
}
.rbm-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding: 5px 0;
    color: #374151;
}
.rbm-price-row span:last-child { font-weight: 600; }
.rbm-price-divider {
    border: none;
    border-top: 1.5px solid #a7f3d0;
    margin: 10px 0;
}
.rbm-price-total { font-size: 17px; font-weight: 700; }
.rbm-price-total span { color: #065f46 !important; }
.rbm-breakdown-toggle {
    background: none; border: none; padding: 6px 0 0;
    color: #059669; font-size: 12px; font-family: inherit;
    cursor: pointer; text-decoration: underline;
}
#rbm-breakdown-list { margin-top: 10px; border-radius: 6px; overflow: hidden; border: 1px solid #a7f3d0; }
#rbm-breakdown-list table { width: 100%; border-collapse: collapse; font-size: 12px; }
#rbm-breakdown-list th { background: #d1fae5; padding: 6px 10px; color: #065f46; font-weight: 600; text-align: left; }
#rbm-breakdown-list td { padding: 4px 10px; border-top: 1px solid #d1fae5; }
#rbm-breakdown-list tr:nth-child(even) td { background: #f0fdf4; }

/* ── Submit ── */
.rbm-submit {
    margin-top: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1a6b5a, #0d4a3a);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(26,107,90,0.30);
    transition: transform .15s, box-shadow .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.rbm-submit:hover  { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,107,90,0.40); }
.rbm-submit:active { transform: translateY(0); }
.rbm-submit:disabled { background: #94a3b8; box-shadow: none; transform: none; cursor: not-allowed; }

/* ── Messages ── */
.rbm-message {
    margin-top: 14px;
    padding: 13px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
}
.rbm-success { background: #ecfdf5; color: #065f46; border: 1.5px solid #a7f3d0; }
.rbm-error   { background: #fef2f2; color: #991b1b; border: 1.5px solid #fca5a5; }

@media (max-width: 600px) {
    .rbm-row   { grid-template-columns: 1fr; }
    .rbm-form  { padding: 20px 16px 24px; }
    .rbm-header { padding: 20px 18px !important; }
    .rbm-calendar-section { padding: 16px; }
    .rbm-title  { font-size: 18px !important; }
}
