/* Schedule Calendar Styles - Committee Meetings Design */

.schedule-calendar-wrapper {
    width: 100%;
    margin: 20px 0;
    font-family: Georgia, "Times New Roman", serif;
}

.schedule-calendar-section-title {
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
    font-weight: normal;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #d32f2f;
    color: #333;
}

.schedule-calendar-container {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
}

/* Header */
.schedule-calendar-header {
    margin-bottom: 10px;
}

.schedule-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-bottom: 10px;
}

.schedule-calendar-nav-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    padding: 5px 8px;
    transition: color 0.2s;
    line-height: 1;
}

.schedule-calendar-nav-btn:hover {
    color: #333;
}

.schedule-calendar-month-year {
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 3px;
    margin: 0 8px;
    min-width: 130px;
    text-align: center;
}

.schedule-calendar-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}


/* Content */
.schedule-calendar-content {
    position: relative;
    width: 100%;
    min-height: 300px;
}

.schedule-calendar-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Month View */
.schedule-calendar-month-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border: none;
    table-layout: fixed;
}

.schedule-calendar-month-table thead th {
    background: white;
    padding: 6px 4px;
    text-align: center;
    font-weight: bold;
    border: none;
    border-bottom: 1px dotted #ddd;
    color: #666;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.schedule-calendar-month-table td {
    border: none;
    padding: 4px 2px;
    vertical-align: top;
    min-height: 60px;
    height: auto;
    width: 14.28%;
    text-align: center;
    position: relative;
    background: white;
    display: table-cell;
}

.schedule-calendar-day-cell {
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.schedule-calendar-day-cell:hover {
    background: #f5f5f5 !important;
}

.schedule-calendar-day-cell.schedule-calendar-other-month {
    background: #fafafa;
    color: #999;
}

.schedule-calendar-day-cell.schedule-calendar-other-month .schedule-calendar-day-number {
    color: #999 !important;
}

.schedule-calendar-day-cell.schedule-calendar-today {
    background: #e3f2fd !important;
}

.schedule-calendar-day-cell.schedule-calendar-selected {
    background: #fff3cd !important;
}

.schedule-calendar-day-cell.schedule-calendar-selected.schedule-calendar-today {
    background: #e3f2fd !important;
}

.schedule-calendar-day-cell.schedule-calendar-today .schedule-calendar-day-number {
    background: #0073aa;
    color: white;
    border-radius: 3px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin: 0 auto;
    padding: 0;
}

/* Weekend dates in red */
.schedule-calendar-day-cell[data-day="0"] .schedule-calendar-day-number:not(.schedule-calendar-today),
.schedule-calendar-day-cell[data-day="6"] .schedule-calendar-day-number:not(.schedule-calendar-today) {
    color: #d32f2f !important;
}

.schedule-calendar-day-number {
    font-weight: 600;
    margin-bottom: 3px;
    font-size: 16px;
    display: block;
    color: #333;
    line-height: 1.2;
    text-align: center;
}

/* Dates with events get blue underline */
.schedule-calendar-day-number.schedule-calendar-has-events {
    border-bottom: 2px solid #0073aa;
    padding-bottom: 2px;
    display: inline-block;
    margin-bottom: 3px;
}

/* Today's date with events - show underline even with blue background */
.schedule-calendar-day-number.schedule-calendar-today.schedule-calendar-has-events {
    border-bottom: 2px solid #0073aa;
    padding-bottom: 2px;
}

.schedule-calendar-event {
    background: #0073aa;
    color: white;
    padding: 2px 4px;
    margin: 1px 0;
    border-radius: 2px;
    font-size: 12px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    text-align: left;
    box-sizing: border-box;
    line-height: 1.2;
}

.schedule-calendar-event:hover {
    opacity: 0.9;
}

.schedule-calendar-event-title {
    font-weight: 500;
    display: block;
}

.schedule-calendar-event-time {
    font-size: 11px;
    opacity: 0.9;
    display: block;
    margin-top: 1px;
}

.schedule-calendar-more {
    color: #666;
    font-size: 11px;
    margin-top: 1px;
    font-style: italic;
}

/* Week View */
.schedule-calendar-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #ddd;
    border: 1px solid #ddd;
}

.schedule-calendar-week-day {
    background: white;
    min-height: 250px;
    padding: 6px;
    cursor: pointer;
}

.schedule-calendar-week-day.schedule-calendar-today {
    background: #e3f2fd;
}

.schedule-calendar-week-day-header {
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.schedule-calendar-day-name {
    font-weight: 600;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
}

.schedule-calendar-week-day .schedule-calendar-day-number {
    font-size: 24px;
    font-weight: 600;
    margin-top: 4px;
}

.schedule-calendar-week-day-events {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.schedule-calendar-week-day .schedule-calendar-event {
    padding: 8px;
    margin: 0;
    white-space: normal;
    word-wrap: break-word;
}

.schedule-calendar-week-day .schedule-calendar-event-title {
    font-size: 16px;
    margin-bottom: 4px;
}

.schedule-calendar-week-day .schedule-calendar-event-time {
    font-size: 13px;
}

.schedule-calendar-week-day .schedule-calendar-event-description {
    font-size: 13px;
    margin-top: 4px;
    opacity: 0.9;
}

/* Day View */
.schedule-calendar-day-view-content {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.schedule-calendar-day-header {
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.schedule-calendar-day-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.schedule-calendar-day-events {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.schedule-calendar-event-large {
    background: white;
    border-left: 4px solid #0073aa;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.schedule-calendar-event-large:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.schedule-calendar-event-large .schedule-calendar-event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.schedule-calendar-event-large .schedule-calendar-event-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.schedule-calendar-event-large .schedule-calendar-event-time {
    color: #666;
    font-size: 13px;
}

.schedule-calendar-event-large .schedule-calendar-event-description {
    color: #555;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 8px;
}

.schedule-calendar-no-events {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* Year View */
.schedule-calendar-year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.schedule-calendar-year-month {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.schedule-calendar-year-month h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.schedule-calendar-year-count {
    color: #666;
    font-size: 13px;
}

/* Modal */
.schedule-calendar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-calendar-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.schedule-calendar-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.schedule-calendar-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.schedule-calendar-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.schedule-calendar-modal-close:hover {
    color: #333;
}

.schedule-calendar-modal-body {
    padding: 20px;
}

.schedule-calendar-form-group {
    margin-bottom: 20px;
}

.schedule-calendar-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.schedule-calendar-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.schedule-calendar-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.schedule-calendar-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.schedule-calendar-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.schedule-calendar-btn-primary {
    background: #0073aa;
    color: white !important;
    border: none;
    padding: 6px 12px !important;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    min-width: auto;
}

.schedule-calendar-btn-primary:hover {
    background: #005a87;
    color: white !important;
}

.schedule-calendar-btn-secondary {
    background: #6c757d !important;
    color: white !important;
    border: none !important;
    padding: 6px 12px !important;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    min-width: auto;
}

.schedule-calendar-btn-secondary:hover {
    background: #5a6268 !important;
    color: white !important;
}

/* Ensure Cancel button displays correctly */
button.schedule-calendar-btn-secondary.schedule-calendar-modal-close,
.schedule-calendar-form-actions .schedule-calendar-btn-secondary {
    background: #6c757d !important;
    color: white !important;
    border: none !important;
    padding: 6px 12px !important;
    display: inline-block;
    width: auto;
    min-width: 70px;
    text-align: center;
}

.schedule-calendar-btn-danger {
    background: #dc3545;
    color: white;
}

.schedule-calendar-btn-danger:hover {
    background: #c82333;
}

/* Event Details Section */
.schedule-calendar-event-details {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    margin-top: 0;
    width: 100%;
    box-sizing: border-box;
}

.schedule-calendar-selected-date {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-style: italic;
    color: #0073aa;
    margin-bottom: 8px;
    text-align: center;
}

.schedule-calendar-meeting-headers {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
}

.schedule-calendar-meeting-label,
.schedule-calendar-time-label {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    color: #d32f2f;
    font-weight: normal;
}

.schedule-calendar-meeting-list {
    min-height: 30px;
    color: #999;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    text-align: center;
    padding: 8px 0;
}

.schedule-calendar-meeting-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
}

.schedule-calendar-meeting-item:last-child {
    border-bottom: none;
}

.schedule-calendar-meeting-name {
    color: #333;
    font-weight: 500;
}

.schedule-calendar-meeting-time {
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .schedule-calendar-wrapper {
        max-width: 100%;
    }
    
    .schedule-calendar-container {
        max-width: 100%;
    }
    
    .schedule-calendar-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .schedule-calendar-nav {
        flex-wrap: wrap;
    }
    
    .schedule-calendar-view-switcher {
        justify-content: center;
    }
    
    .schedule-calendar-month-table td {
        height: 60px;
        padding: 4px 2px;
    }
    
    .schedule-calendar-day-number {
        font-size: 16px;
    }
    
    .schedule-calendar-event {
        font-size: 12px;
        padding: 3px 4px;
    }
    
    .schedule-calendar-week-grid {
        grid-template-columns: 1fr;
    }
    
    .schedule-calendar-year-grid {
        grid-template-columns: 1fr;
    }
    
    .schedule-calendar-form-row {
        grid-template-columns: 1fr;
    }
}
