/* Hermes Schedule Calendar - Calendar Grid Styles */

.hermes-schedule-container {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.hermes-schedule-empty {
    padding: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    text-align: center;
    color: #856404;
}

/* Week Header with Navigation */
.hermes-schedule-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    gap: 20px;
}

/* Desktop: align to right */
@media screen and (min-width: 769px) {
    .hermes-schedule-header {
        justify-content: flex-end;
    }
}

.hermes-week-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #333;
    min-width: 240px;
    text-align: center;
}

.hermes-week-nav {
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.hermes-week-nav:hover:not(:disabled) {
    background: #5568d3;
}

.hermes-week-nav:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Calendar Grid */
.hermes-calendar-grid {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

/* Grid Header (Day Names) */
.hermes-grid-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
}

.hermes-time-col {
    padding: 15px;
}

.hermes-day-col {
    padding: 15px;
    text-align: center;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.hermes-day-name {
    font-size: 14px;
}

/* Grid Body */
.hermes-grid-body {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    position: relative;
}

/* Time Column */
.hermes-time-column {
    border-right: 1px solid #e0e0e0;
}

.hermes-time-slot {
    height: 60px;
    padding-right: 12px;
    font-size: 11px;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    box-sizing: border-box;
}

/* Day Columns */
.hermes-day-column {
    position: relative;
    border-left: 1px solid #e0e0e0;
}

.hermes-grid-slot {
    height: 60px;
    border-bottom: 1px solid #f0f0f0;
    box-sizing: border-box;
}

/* Mobile day indicator - hidden by default */
.hermes-mobile-day-indicator {
    display: none;
}

/* Calendar Events */
.hermes-calendar-event {
    position: absolute;
    left: 2px;
    right: 2px;
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: 2px;
    padding: 4px 8px;
    font-size: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    box-sizing: border-box;
}

.hermes-calendar-event:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
}

.hermes-event-time {
    font-weight: 700;
    font-size: 11px;
    color: #1976d2;
    margin-bottom: 2px;
}

.hermes-event-title {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hermes-event-organizer {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hermes-event-capacity {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.full-badge {
    display: inline-block;
    background: #dc3545;
    color: #fff;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 700;
    margin-left: 4px;
}

/* Loading State */
.hermes-schedule-content.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Event Tooltip */
.hermes-event-tooltip {
    position: absolute;
    display: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 200px;
    max-width: 300px;
    font-size: 13px;
    line-height: 1.5;
}

.hermes-event-tooltip.below {
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

.hermes-tooltip-title {
    font-weight: 700;
    font-size: 15px;
    color: #333;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
}

.hermes-tooltip-time {
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 6px;
}

.hermes-tooltip-organizer {
    color: #555;
    margin-bottom: 6px;
}

.hermes-tooltip-capacity {
    color: #666;
    font-weight: 600;
    margin-bottom: 6px;
}

.hermes-tooltip-notes {
    color: #777;
    font-style: italic;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .hermes-grid-header,
    .hermes-grid-body {
        grid-template-columns: 60px repeat(7, 1fr);
    }

    .hermes-event-title {
        font-size: 11px;
    }
}

@media screen and (max-width: 768px) {
    .hermes-schedule-container {
        margin: 10px;
    }

    .hermes-schedule-header {
        gap: 10px;
        margin-bottom: 15px;
    }

    .hermes-week-title {
        font-size: 16px;
        min-width: auto;
        flex: 1;
        white-space: nowrap;
        overflow: visible;
    }

    .hermes-week-nav {
        flex-shrink: 0;
    }

    /* Show only one day at a time on mobile */
    .hermes-grid-header,
    .hermes-grid-body {
        grid-template-columns: 60px 1fr;
    }

    /* Hide all days except active */
    .hermes-day-col:not(.hermes-day-active) {
        display: none;
    }

    .hermes-day-column:not(.hermes-day-active) {
        display: none;
    }

    /* Tooltip adjustments for mobile */
    .hermes-event-tooltip {
        max-width: 90vw;
        font-size: 12px;
    }

    /* Mobile day indicator */
    .hermes-mobile-day-indicator {
        display: flex;
        justify-content: center;
        gap: 8px;
        padding: 15px 0;
        margin-top: 15px;
    }

    .hermes-day-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ccc;
        transition: all 0.3s;
        cursor: pointer;
        padding: 4px;
    }

    .hermes-day-dot.active {
        background: #667eea;
        width: 24px;
        border-radius: 4px;
    }

    .hermes-day-dot:hover {
        background: #999;
    }

    .hermes-day-dot.active:hover {
        background: #5568d3;
    }
}

@media screen and (max-width: 400px) {
    .hermes-week-title {
        font-size: 14px;
        white-space: normal;
        line-height: 1.3;
    }

    .hermes-schedule-header {
        gap: 8px;
    }
}
