/* =========================================================
   Basilica Choir Time-Off – Front-End Styles
   ========================================================= */

/* ── Reset / base ────────────────────────────────────────── */
.bcto-wrap *,
.bcto-wrap *::before,
.bcto-wrap *::after {
    box-sizing: border-box;
}

.bcto-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
    color: #2c3e50;
    line-height: 1.6;
    max-width: 1100px;
    margin: 0 auto;
    padding: 8px 0;
}

/* ── Notices ─────────────────────────────────────────────── */
.bcto-notice,
.bcto-empty {
    background: #f8f9fa;
    border-left: 4px solid #adb5bd;
    padding: 12px 16px;
    border-radius: 4px;
    color: #555;
}

.bcto-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-weight: 500;
}
.bcto-message.bcto-success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}
.bcto-message.bcto-error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

/* ── Form ────────────────────────────────────────────────── */
.bcto-form {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 28px 32px;
    max-width: 600px;
}

.bcto-field {
    margin-bottom: 20px;
}

.bcto-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.92rem;
    color: #333;
}

.bcto-req {
    color: #e74c3c;
    margin-left: 2px;
}

.bcto-field input[type="date"],
.bcto-field select,
.bcto-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    background: #fff;
}

.bcto-field input[type="date"]:focus,
.bcto-field select:focus,
.bcto-field textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.15);
}

.bcto-field-row {
    display: flex;
    gap: 16px;
}

.bcto-half {
    flex: 1;
}

/* ── Buttons ─────────────────────────────────────────────── */
.bcto-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background 0.2s, opacity 0.2s;
    line-height: 1.4;
}
.bcto-btn-primary {
    background: #3498db;
    color: #fff;
    border-color: #2980b9;
}
.bcto-btn-primary:hover { background: #2980b9; color: #fff; }
.bcto-btn-secondary {
    background: #ecf0f1;
    color: #333;
    border-color: #bdc3c7;
}
.bcto-btn-secondary:hover { background: #dfe6e9; }
.bcto-btn-danger {
    background: #e74c3c;
    color: #fff;
    border-color: #c0392b;
}
.bcto-btn-danger:hover { background: #c0392b; color: #fff; }
.bcto-btn-sm {
    padding: 5px 12px;
    font-size: 0.82rem;
}

/* ── Tables ──────────────────────────────────────────────── */
.bcto-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bcto-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    margin-top: 12px;
}

.bcto-table th {
    background: #2c3e50;
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.bcto-table td {
    padding: 9px 14px;
    border-bottom: 1px solid #ecf0f1;
    vertical-align: middle;
}

.bcto-table tbody tr:nth-child(even) { background: #f9f9f9; }
.bcto-table tbody tr:hover           { background: #eaf4fb; }

/* ── Legend ──────────────────────────────────────────────── */
.bcto-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.bcto-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 500;
}

.bcto-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

/* ── Part badge ──────────────────────────────────────────── */
.bcto-part-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── Status badges ───────────────────────────────────────── */
.bcto-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
}
.bcto-status-approved { background: #d4edda; color: #155724; }
.bcto-status-pending  { background: #fff3cd; color: #856404; }

/* ── Calendar ────────────────────────────────────────────── */
.bcto-calendar-wrap,
.bcto-section-view-wrap {
    padding: 4px 0;
}

#bcto-calendar,
#bcto-section-calendar {
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

/* FullCalendar event tooltip */
.bcto-fc-tooltip {
    background: rgba(0,0,0,0.82);
    color: #fff;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    max-width: 260px;
    white-space: pre-line;
}

/* ── Filters (director dashboard / export) ───────────────── */
.bcto-filter-form {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.bcto-filter-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.bcto-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bcto-filter-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
}

.bcto-filter-group select,
.bcto-filter-group input[type="date"] {
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 0.88rem;
    background: #fff;
    min-width: 140px;
}

.bcto-filter-actions {
    flex-direction: row;
    gap: 8px;
}

.bcto-results-count {
    font-size: 0.88rem;
    color: #666;
    margin: 0 0 8px;
}

/* ── Director dashboard table ────────────────────────────── */
.bcto-delete-form { margin: 0; }

/* ── Member history summary line ─────────────────────────── */
.bcto-summary-line {
    font-size: 0.88rem;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

/* ── Monthly summary stats bar ───────────────────────────── */
.bcto-stats-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 16px 0 24px;
}

.bcto-stat {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 14px 20px;
    text-align: center;
    min-width: 110px;
    border-top: 3px solid #3498db;
}

.bcto-stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    color: #2c3e50;
}

.bcto-stat-label {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Monthly summary sections ────────────────────────────── */
.bcto-summary-section {
    margin-bottom: 28px;
}

.bcto-summary-heading {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 10px;
    padding-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bcto-count-badge {
    background: rgba(0,0,0,0.08);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: inherit;
}

/* ── Month navigation ────────────────────────────────────── */
.bcto-month-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.bcto-month-current {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c3e50;
}

/* ── Print view ──────────────────────────────────────────── */
.bcto-print-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.bcto-print-meta {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
}

.bcto-print-section-heading {
    font-size: 1rem;
    font-weight: 700;
    margin: 20px 0 6px;
}

.bcto-print-footer {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

/* ── Export hint ─────────────────────────────────────────── */
.bcto-export-hint {
    font-size: 0.82rem;
    color: #888;
    margin-top: 10px;
}

.bcto-description {
    color: #555;
    margin-bottom: 16px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .bcto-field-row         { flex-direction: column; }
    .bcto-filter-row        { flex-direction: column; }
    .bcto-filter-actions    { flex-direction: column; }
    .bcto-stats-bar         { flex-direction: column; }
    .bcto-month-nav         { flex-direction: column; align-items: flex-start; }
    .bcto-form              { padding: 18px 16px; }
}
