/* ── Crew Connect Calendar Styles ───────────────────────────────────────────── */

.cc-calendar-wrap {
    font-family: inherit;
    max-width: 520px;
}

.cc-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cc-cal-nav {
    background: rgba(200,146,42,.15);
    border: 1px solid rgba(200,146,42,.3);
    color: #C8922A;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.cc-cal-nav:hover { background: rgba(200,146,42,.3); }

.cc-cal-month-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #F5F5F0;
}

/* Type selector */
.cc-cal-type-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    align-items: center;
}

.cc-cal-type-btn {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.6);
    transition: all .15s;
}
.cc-cal-type-btn input { display: none; }
.cc-cal-type-btn.active,
.cc-cal-type-btn:has(input:checked) {
    border-color: #C8922A;
    background: rgba(200,146,42,.2);
    color: #C8922A;
}

/* Grid header */
.cc-cal-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}
.cc-cal-grid-header div {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: rgba(255,255,255,.4);
    padding: 4px 0;
}

/* Day grid */
.cc-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.cc-cal-day {
    aspect-ratio: 1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    position: relative;
    background: rgba(255,255,255,.05);
    border: 1px solid transparent;
    color: rgba(255,255,255,.7);
    user-select: none;
}

.cc-cal-day:hover:not(.cc-cal-empty):not(.cc-cal-past) {
    border-color: #C8922A;
    background: rgba(200,146,42,.15);
    color: #fff;
}

.cc-cal-day.cc-cal-today {
    border-color: #C8922A !important;
    color: #C8922A !important;
    font-weight: 800;
}

.cc-cal-day.cc-cal-empty {
    background: transparent;
    cursor: default;
    border: none;
}

.cc-cal-day.cc-cal-past {
    opacity: .3;
    cursor: default;
}

/* Availability colours */
.cc-cal-day.cc-cal-available    { background: #c8f0de; border-color: #4caf82; color: #1a5c3a; }
.cc-cal-day.cc-cal-on_contract  { background: #c5dff8; border-color: #2e7fc2; color: #0d3b6e; }
.cc-cal-day.cc-cal-unavailable  { background: #fcc8c8; border-color: #e05252; color: #7a0000; }
.cc-cal-day.cc-cal-leave        { background: #ffe5a0; border-color: #d4920a; color: #5a3a00; }
.cc-cal-day.cc-cal-medical      { background: #e8c8f5; border-color: #8b3bbf; color: #3d0060; }

/* Read-only mode */
.cc-calendar-wrap[data-editable="0"] .cc-cal-day { cursor: default; }
.cc-calendar-wrap[data-editable="0"] .cc-cal-day:hover { border-color: transparent; background: rgba(255,255,255,.05); }
.cc-calendar-wrap[data-editable="0"] .cc-cal-day.cc-cal-available:hover    { background: rgba(46,204,138,.25); }
.cc-calendar-wrap[data-editable="0"] .cc-cal-day.cc-cal-on_contract:hover  { background: rgba(21,101,192,.3); }
.cc-calendar-wrap[data-editable="0"] .cc-cal-day.cc-cal-unavailable:hover  { background: rgba(224,82,82,.25); }
.cc-calendar-wrap[data-editable="0"] .cc-cal-day.cc-cal-leave:hover        { background: rgba(240,168,48,.25); }
.cc-calendar-wrap[data-editable="0"] .cc-cal-day.cc-cal-medical:hover      { background: rgba(106,27,154,.3); }

/* Tooltip */
.cc-cal-day[data-note]:not([data-note=""])::after {
    content: attr(data-note);
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%);
    background: #0B1929;
    color: #F5F5F0;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    display: none;
    z-index: 10;
    border: 1px solid rgba(200,146,42,.3);
}
.cc-cal-day[data-note]:not([data-note=""]):hover::after { display: block; }

/* Legend */
.cc-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.cc-cal-legend-item {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 12px;
}
.cc-cal-legend-item.cc-cal-available    { background: #c8f0de; color: #1a5c3a; }
.cc-cal-legend-item.cc-cal-on_contract  { background: #c5dff8; color: #0d3b6e; }
.cc-cal-legend-item.cc-cal-unavailable  { background: #fcc8c8; color: #7a0000; }
.cc-cal-legend-item.cc-cal-leave        { background: #ffe5a0; color: #5a3a00; }
.cc-cal-legend-item.cc-cal-medical      { background: #e8c8f5; color: #3d0060; }

.cc-cal-loading {
    grid-column: span 7;
    text-align: center;
    padding: 32px;
    color: rgba(255,255,255,.4);
    font-size: 13px;
}

/* Light theme override (for recruiter admin) */
.cc-calendar-light .cc-cal-day {
    background: #f5f7fa;
    border-color: #e0e0e0;
    color: #333;
}
.cc-calendar-light .cc-cal-month-label { color: #0f4c81; }
.cc-calendar-light .cc-cal-nav { color: #0f4c81; background: #e3f2fd; border-color: #1565c0; }
.cc-calendar-light .cc-cal-grid-header div { color: #666; }
.cc-calendar-light .cc-cal-day.cc-cal-available    { background: #4caf82; border-color: #2e7d55; color: #fff; font-weight: 700; }
.cc-calendar-light .cc-cal-day.cc-cal-on_contract  { background: #1976d2; border-color: #0d47a1; color: #fff; font-weight: 700; }
.cc-calendar-light .cc-cal-day.cc-cal-unavailable  { background: #e53935; border-color: #b71c1c; color: #fff; font-weight: 700; }
.cc-calendar-light .cc-cal-day.cc-cal-leave        { background: #f9a825; border-color: #c17900; color: #fff; font-weight: 700; }
.cc-calendar-light .cc-cal-day.cc-cal-medical      { background: #8e24aa; border-color: #6a0080; color: #fff; font-weight: 700; }
.cc-calendar-light .cc-cal-legend-item.cc-cal-available    { background: #4caf82; color: #fff; }
.cc-calendar-light .cc-cal-legend-item.cc-cal-on_contract  { background: #1976d2; color: #fff; }
.cc-calendar-light .cc-cal-legend-item.cc-cal-unavailable  { background: #e53935; color: #fff; }
.cc-calendar-light .cc-cal-legend-item.cc-cal-leave        { background: #f9a825; color: #fff; }
.cc-calendar-light .cc-cal-legend-item.cc-cal-medical      { background: #8e24aa; color: #fff; }
