﻿.select-calendar-users {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.calendar-form-group {
    margin-bottom: 15px;
}

    .calendar-form-group label {
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
    }

/* Checkbox plus its (i) icon on one line, so the icon reads as belonging to that checkbox. */
.calendar-checkbox-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Hover/focus target for the explanation of a setting whose label alone doesn't say what it does. */
.calendar-field-info {
    display: inline-flex;
    align-items: center;
    color: #9ca3af;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
}

    .calendar-field-info:hover,
    .calendar-field-info:focus {
        color: #6b7280;
    }

.calendar-input-field {
    width: 100%;
}

.repeat-interval-input {
    width: 100%;
    margin-right: 8px;
    flex-grow: 1;
}

.div-repeat-interval {
    display: flex;
    align-items: center;
}

.calendar-form-group-inline {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

    .calendar-form-group-inline label {
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
    }

.calendar-inline-item {
    flex: 1;
}

    .calendar-inline-item label {
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
    }

.calendar-banner-messages {
    margin-bottom: 5px;
    align-items: center;
}

.calendar-dialog-text {
    margin-top: 0px !important;
}

.calendar-dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.calendar-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    pointer-events: auto;
}

.calendar-div {
    position: relative;
}

.mini-calendar-div {
    position: relative;
    width: 100%;
    /* Size to content instead of being locked to the panel height: fills the panel as a
       floor (min-height), and may grow up to 100px past the fold — the outer
       .mini-calendar-content column scrolls that overflow — before the agenda list falls
       back to its own internal scrollbar (max-height cap + .agenda-list min-height: 0). */
    flex: 0 0 auto;
    min-height: 100%;
    max-height: calc(100% + 100px);
    box-sizing: border-box;
    padding-top: 10px;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.agenda-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    background: #fff;
}

/* Sidebar footer: sits below the scrollable agenda list, not inside it, so the disconnect
   action can't scroll away with the day's events. Sticky because .mini-calendar-div may grow
   100px past the panel (see its max-height) and .mini-calendar-content scrolls that overflow —
   without this the footer lands below the fold on a busy day. Opaque bg so agenda events
   don't show through once it sticks. */
.mini-calendar-logout {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 10px;
    padding-top: 8px;
    background: var(--bs-body-bg, #fff);
}

.agenda-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agenda-loading-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 50%, #ccfbf1 100%);
    border: 1px solid #bfdbfe;
}

.agenda-loading-spinner {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 3px solid #bfdbfe;
    border-top-color: #2563eb;
    animation: agendaLoadingSpin 0.85s linear infinite;
}

.agenda-loading-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}

.agenda-loading-text strong {
    font-size: 1.075rem;
    color: #0f172a;
    font-weight: 600;
}

.agenda-loading-text span {
    font-size: 0.945rem;
    color: #475569;
}

@keyframes agendaLoadingSpin {
    to { transform: rotate(360deg); }
}

.agenda-event {
    display: flex;
    flex-direction: column;
    padding: 8px;
    border-bottom: 1px solid #ddd;
    background: #f9f9f9;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 6px;
}

.agenda-loading {
    align-items: center;
    color: #6b7280;
    cursor: default;
}

    .agenda-loading p {
        margin: 0;
        animation: pulse 1.5s ease-in-out infinite;
    }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

    .agenda-event:hover {
        background: #e6e6e6;
    }

/* Task-due rows reuse the event card but carry a left accent so they read as tasks. */
.agenda-event.agenda-task {
    border-left: 3px solid #6b7280;
}

.agenda-time {
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}

.agenda-details {
    width: 100%;
}

.agenda-organizer {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 2px 0;
}

.agenda-location {
    font-size: 13px;
    color: #6b7280;
    margin: 2px 0 0 0;
}

.agenda-link {
    display: inline-block;
    font-size: 13px;
    color: #0078D4;
    text-decoration: none;
    margin-top: 4px;
    font-weight: 500;
}

    .agenda-link:hover {
        text-decoration: underline;
    }

/* House buttons inside the mini-calendar panel (AB#163): the panel is 274px wide, so the
   .fw-btn takes a compact size here; colours, radius and hover come from app.css. */
.mini-calendar-btn.fw-btn {
    padding: 0.35rem 0.8rem;
    font-size: 0.875rem;
    gap: 0.3rem;
}

.agenda-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    margin-bottom: 4px;
}

.add-event-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

    .add-event-btn:hover {
        background: #3b82f6;
        color: #fff;
        border-color: #3b82f6;
    }

.mini-calendar-small-multiselect {
    font-size: 14px !important;
    min-height: 28px !important;
}

.mini-calendar {
    width: 100% !important;
    max-width: 100% !important;
}

.agenda-list p {
    font-size: 16px!important;
}

.agenda-list .agenda-time p {
    font-size: 13px !important;
}

.mini-calendar-modal-btn-delete {
    float: left !important;
}

.agenda-title {
    display: flex;
    align-items: center;
    font-size: 16px !important;
    margin: 0;
}

.agenda-events-count {
    margin-left: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
}

/* Compact month grid — ~25% shorter than the stock calendar so more agenda items fit
   below it in the sidebar panel. Cell height 48px → 36px, with header, weekday row,
   day circles and footer scaled to match. */
.mini-calendar td.e-cell {
    height: 36px !important;
    vertical-align: top !important;
    padding-top: 2px !important;
}

.mini-calendar.e-calendar .e-header {
    height: 32px !important;
    min-height: 32px !important;
}

.mini-calendar.e-calendar .e-header .e-title {
    font-size: 15px !important;
    line-height: 32px !important;
}

.mini-calendar.e-calendar .e-header .e-prev,
.mini-calendar.e-calendar .e-header .e-next {
    height: 28px !important;
    width: 28px !important;
}

.mini-calendar.e-calendar .e-content th {
    height: 22px !important;
    font-size: 13px !important;
    padding: 0 !important;
}

.mini-calendar.e-calendar .e-content span.e-day {
    height: 24px !important;
    width: 24px !important;
    line-height: 24px !important;
    font-size: 14px !important;
}

.mini-calendar.e-calendar .e-footer-container {
    padding: 4px 0 !important;
}

.mini-calendar.e-calendar .e-footer-container .e-today {
    font-size: 14px !important;
    height: 26px !important;
    padding: 2px 10px !important;
}

/* Busyness dots: 1/2/3 dots = light / moderate / busy day, driven by the .mc-busy-N class
   that OnRenderDayCell stamps on the cell. Positioned ABSOLUTELY at the bottom of the cell
   (not inside the day-number's line box) so the tight sidebar row height can't clip them. */
.mini-calendar td.e-cell { position: relative; }

.mini-calendar td.e-cell[class*="mc-busy-"]::after {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1px;
    text-align: center;
    color: #3b82f6;
    font-size: 12px; /* scaled with the 36px compact cells so the dots don't clip */
    line-height: 1;
    letter-spacing: 1.5px;
    pointer-events: none;
}

.mini-calendar td.e-cell.mc-busy-1::after { content: "\2022"; }
.mini-calendar td.e-cell.mc-busy-2::after { content: "\2022\2022"; }
.mini-calendar td.e-cell.mc-busy-3::after { content: "\2022\2022\2022"; }

/* Exact event count on hover. Syncfusion's OnRenderDayCell can only set classes (no title
   attribute), so the count is carried by the .mc-count-N class and shown as a small CSS
   tooltip. Bubble uses the td's ::before so it doesn't clash with the dots (span.e-day::after). */
.mini-calendar td.e-cell[class*="mc-count-"] { position: relative; }
.mini-calendar td.e-cell[class*="mc-count-"]:hover::before {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    padding: 2px 6px;
    background: #1f2937;
    color: #fff;
    font-size: 12px;
    line-height: 1.3;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 20;
    pointer-events: none;
}
.mini-calendar td.e-cell.mc-count-1:hover::before  { content: "1 event"; }
.mini-calendar td.e-cell.mc-count-2:hover::before  { content: "2 events"; }
.mini-calendar td.e-cell.mc-count-3:hover::before  { content: "3 events"; }
.mini-calendar td.e-cell.mc-count-4:hover::before  { content: "4 events"; }
.mini-calendar td.e-cell.mc-count-5:hover::before  { content: "5 events"; }
.mini-calendar td.e-cell.mc-count-6:hover::before  { content: "6 events"; }
.mini-calendar td.e-cell.mc-count-7:hover::before  { content: "7 events"; }
.mini-calendar td.e-cell.mc-count-8:hover::before  { content: "8 events"; }
.mini-calendar td.e-cell.mc-count-9:hover::before  { content: "9 events"; }
.mini-calendar td.e-cell.mc-count-10:hover::before { content: "10 events"; }
.mini-calendar td.e-cell.mc-count-11:hover::before { content: "11 events"; }
.mini-calendar td.e-cell.mc-count-12:hover::before { content: "12 events"; }
.mini-calendar td.e-cell.mc-count-13:hover::before { content: "13 events"; }
.mini-calendar td.e-cell.mc-count-14:hover::before { content: "14 events"; }
.mini-calendar td.e-cell.mc-count-15:hover::before { content: "15 events"; }
.mini-calendar td.e-cell.mc-count-16:hover::before { content: "16 events"; }
.mini-calendar td.e-cell.mc-count-17:hover::before { content: "17 events"; }
.mini-calendar td.e-cell.mc-count-18:hover::before { content: "18 events"; }
.mini-calendar td.e-cell.mc-count-19:hover::before { content: "19 events"; }
.mini-calendar td.e-cell.mc-count-20:hover::before { content: "20+ events"; }

/* ── Calendar access requests (same permission model as the full calendar page, compact) ── */

/* Incoming approve/decline banner */
.mini-calendar-access-requests {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    padding: 6px 10px;
    margin-bottom: 8px;
    font-size: 0.945rem;
}

/* Locked-selection request prompts */
.mini-calendar-request-prompts {
    background-color: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 4px 10px;
    margin: 6px 0 8px 0;
    font-size: 0.945rem;
}

.mini-calendar-access-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    padding: 3px 0;
}

.mini-calendar-access-item .calendar-access-request-actions {
    display: inline-flex;
    gap: 6px;
    white-space: nowrap;
}

.mini-calendar-access-item .access-request-link {
    color: #0d6efd;
    text-decoration: underline;
    white-space: nowrap;
}

.mini-calendar-access-item .access-request-sent {
    color: #6c757d;
    white-space: nowrap;
}

/* Locked colleagues in the mini picker dropdown (popup renders outside pages that load
   calendar.css, so these live here too) */
.mini-calendar-small-multiselect ~ .e-popup .calendar-user-option,
.e-multiselect.e-popup .calendar-user-option,
.calendar-user-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.calendar-user-locked {
    color: #6c757d;
    font-size: 0.925rem;
    white-space: nowrap;
}

/* Event-editor Advanced section (mini-calendar dialog renders outside the pages that load
   calendar.css, so these live here too — same rules, kept in step with calendar.css) */
.calendar-advanced-section {
    margin-top: 8px;
    border-top: 1px solid #e5e7eb;
    padding-top: 8px;
}

.calendar-advanced-section > summary {
    cursor: pointer;
    font-weight: 600;
    padding: 6px 0;
    user-select: none;
}

.calendar-advanced-section[open] > summary {
    margin-bottom: 8px;
}

.calendar-color-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.calendar-meet-link {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.975rem;
    color: #1a73e8;
    text-decoration: underline;
    word-break: break-all;
}
