/**
 * Read-only staff booking calendar ([mlb_staff_calendar]).
 * A front-end copy of the admin "Reservas → Calendario" styles (admin.css),
 * scoped to .mlb-staff-cal so it doesn't depend on the wp-admin stylesheet.
 */

.mlb-staff-cal {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a2e;
    font-size: 14px;
    line-height: 1.4;
}
.mlb-staff-cal .mlb-cal-table,
.mlb-staff-cal .mlb-cal-table * { line-height: 1.25; }

.mlb-staff-cal-denied {
    padding: 24px;
    text-align: center;
    color: #6b7280;
}

.mlb-staff-cal .mlb-cal-wrap {
    overflow-x: auto;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 20px 24px;
}

.mlb-staff-cal .mlb-cal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.mlb-staff-cal .mlb-cal-btn {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #1a1a2e;
    text-decoration: none;
    font-size: .85rem;
    line-height: 1.5;
}
.mlb-staff-cal .mlb-cal-btn:hover { background: #f3f4f6; }

.mlb-staff-cal .mlb-cal-month-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    min-width: 180px;
    text-align: center;
}

.mlb-staff-cal .mlb-cal-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 14px;
    font-size: .82rem;
    color: #555;
    flex-wrap: wrap;
}

.mlb-staff-cal .mlb-cal-legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 4px;
}

.mlb-staff-cal .mlb-cal-table {
    border-collapse: collapse;
    table-layout: auto;
    white-space: nowrap;
}
.mlb-staff-cal .mlb-cal-table th,
.mlb-staff-cal .mlb-cal-table td { box-sizing: border-box; }

.mlb-staff-cal .mlb-cal-prop-header {
    width: 160px;
    min-width: 160px;
    text-align: left;
    padding: 6px 12px;
    background: #f8f8f8;
    border: 1px solid #e4e4e4;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #666;
}

.mlb-staff-cal .mlb-cal-day-header {
    width: 32px;
    min-width: 32px;
    text-align: center;
    padding: 4px 2px;
    background: #f8f8f8;
    border: 1px solid #e4e4e4;
    font-weight: 600;
    color: #555;
    line-height: 1.25;
    vertical-align: middle;
}

.mlb-staff-cal .mlb-cal-dow {
    display: block;
    font-size: .65rem;
    color: #999;
    font-weight: 400;
    text-transform: uppercase;
}

.mlb-staff-cal .mlb-cal-dnum {
    display: block;
    font-size: .82rem;
}

.mlb-staff-cal .mlb-cal-weekend .mlb-cal-dnum { color: #9b3333; }

.mlb-staff-cal .mlb-cal-prop {
    width: 160px;
    min-width: 160px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: .85rem;
    white-space: nowrap;
    background: #f8f8f8;
    border: 1px solid #e4e4e4;
    vertical-align: middle;
}

.mlb-staff-cal .mlb-cal-prop-type {
    display: block;
    font-weight: 400;
    font-size: .72rem;
    color: #999;
    text-transform: capitalize;
}

.mlb-staff-cal .mlb-cal-day {
    width: 32px;
    min-width: 32px;
    height: 32px;
    text-align: center;
    border: 1px solid #e4e4e4;
    vertical-align: middle;
    padding: 0;
    position: relative;
}

.mlb-staff-cal .mlb-cal-day.mlb-cal-weekend { opacity: .9; }

/* Accommodation colours */
.mlb-staff-cal .mlb-day-free     { background: #d1fae5; }
.mlb-staff-cal .mlb-day-booked   { background: #fca5a5; }
.mlb-staff-cal .mlb-day-turnover { background: #fca5a5; }
.mlb-staff-cal .mlb-day-blocked  { background: repeating-linear-gradient(45deg, #d4d4d8 0 5px, #e4e4e7 5px 10px); }
.mlb-staff-cal .mlb-day-checkout { background: linear-gradient(to bottom right, #fca5a5 50%, #d1fae5 50%); }
.mlb-staff-cal .mlb-day-checkin  { background: linear-gradient(to bottom right, #d1fae5 50%, #fca5a5 50%); }

/* CoWorking colours */
.mlb-staff-cal .mlb-day-partial { background: #fef08a; }
.mlb-staff-cal .mlb-day-full    { background: #f87171; }

/* Clickable cells (have bookings — open the read-only modal) */
.mlb-staff-cal .mlb-day-clickable        { cursor: pointer; }
.mlb-staff-cal .mlb-day-clickable:hover  { filter: brightness(.93); }

.mlb-staff-cal .mlb-cal-cwcount {
    font-size: .68rem;
    font-weight: 700;
    color: #444;
    line-height: 1;
}

/* Legend dots reuse the day-colour classes above. */

/* ── Day-click modal (read-only) ─────────────────────────── */
#mlb-day-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, .45);
    align-items: center;
    justify-content: center;
}
#mlb-day-modal.active { display: flex; }

#mlb-day-modal .mlb-modal-box {
    background: #fff;
    border-radius: 8px;
    padding: 24px 28px;
    width: 90%;
    max-width: 460px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .22);
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a2e;
}

#mlb-day-modal .mlb-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #aaa;
    padding: 0;
}
#mlb-day-modal .mlb-modal-close:hover { color: #333; }

#mlb-day-modal .mlb-modal-title {
    margin: 0 0 14px;
    font-size: 1rem;
    font-weight: 700;
    padding-right: 24px;
}

#mlb-day-modal .mlb-modal-booking {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

#mlb-day-modal .mlb-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: .78rem;
    font-weight: 600;
    text-transform: capitalize;
}
#mlb-day-modal .mlb-badge-confirmed { background: #d1fae5; color: #065f46; }
#mlb-day-modal .mlb-badge-pending   { background: #fef3c7; color: #92400e; }
#mlb-day-modal .mlb-badge-cancelled { background: #fee2e2; color: #991b1b; }
