/* Live Calendar Custom Styles for TOAST UI Calendar */

.live-calendar-container {
    padding: 20px;
    background: #fff;
}

/* Highlight Today - Added requested styling */
.toastui-calendar-daygrid-cell-today,
.toastui-calendar-daygrid-cell.toastui-calendar-today,
.toastui-calendar-timegrid-today {
    background-color: #fcf8e3 !important;
    box-shadow: inset 0 0 0 2px #ff6600 !important;
}

/* Make today's date number distinct */
.toastui-calendar-daygrid-cell-today .toastui-calendar-daygrid-date,
.toastui-calendar-today .toastui-calendar-daygrid-date {
    color: #ff6600 !important;
    font-weight: bold;
    font-size: 1.2em;
}

/* Custom Navigation */
.toastui-calendar-nav {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
}

.toastui-calendar-nav button {
    cursor: pointer;
}

.toastui-calendar-nav #cal-title {
    display: inline-block;
    margin-left: 20px;
    font-size: 18px;
    font-weight: bold;
}

/* Calendar container minimum height */
#live-calendar {
    min-height: 600px;
}

/* Week view fixes: hide panel resize/collapse buttons and scrollbars */
.toastui-calendar-panel-resizer,
.toastui-calendar-panel-collapse-button,
.toastui-calendar-panel-expand-button,
.toastui-calendar-allday-panel-collapse-btn,
.toastui-calendar-timegrid-timezone-collapse-button {
    display: none !important;
}

/* Force allday panel to expand fully — override inline styles */
#live-calendar .toastui-calendar-panel:not(.toastui-calendar-time) {
    height: auto !important;
    min-height: 50px !important;
    max-height: none !important;
    overflow: visible !important;
}

#live-calendar [class*="allday"] {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Clean up week view time grid scroll */
.toastui-calendar-timegrid {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Hide any extra scrollbar overlays */
.toastui-calendar-panel::-webkit-scrollbar {
    width: 4px;
}
.toastui-calendar-panel::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.live-calendar-filters {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.live-calendar-filter-item {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 10px;
}

.live-calendar-filter-checkbox {
    margin-right: 5px;
}

.live-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px 0;
}

.live-calendar-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-calendar-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

/* Event Detail Page */
.event-detail {
    padding: 20px;
}

.event-detail-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.event-detail-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.event-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

.event-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-detail-category {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.event-detail-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
}

.event-detail-description {
    line-height: 1.8;
    color: #444;
    margin-bottom: 30px;
}

.event-detail-products {
    margin-top: 40px;
}

.event-detail-products h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

/* Upcoming Events Widget */
.live-calendar-widget {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
}

.live-calendar-widget-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    color: #333;
}

.live-calendar-widget-event {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.live-calendar-widget-event:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.live-calendar-widget-event-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.live-calendar-widget-event-details {
    flex: 1;
}

.live-calendar-widget-event-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.live-calendar-widget-event-date {
    font-size: 12px;
    color: #666;
}

.live-calendar-widget-event-category {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.live-calendar-no-events {
    text-align: center;
    padding: 20px;
    color: #999;
}

/* Respect event text color from data (override Toast UI default #333) */
.toastui-calendar-weekday-event-dot + .toastui-calendar-weekday-event-title {
    color: inherit !important;
}

/* Compact module view for columns */
.live-calendar-module {
    padding: 10px;
}

.live-calendar-module h3 {
    font-size: 16px;
    margin: 0 0 10px;
}

.live-calendar-module .toastui-calendar-nav,
.live-calendar-module .live-calendar-filters {
    display: none !important;
}

.live-calendar-module .toastui-calendar-weekday-grid-date,
.live-calendar-module .toastui-calendar-daygrid-date {
    font-size: 11px;
}

.live-calendar-module .toastui-calendar-weekday-event-title {
    font-size: 11px;
}

.live-calendar-module .toastui-calendar-weekday-event {
    background-color: transparent !important;
    border-color: transparent !important;
}

.live-calendar-module .toastui-calendar-weekday-event-title {
    display: none !important;
}

.live-calendar-module .toastui-calendar-weekday-event-dot {
    background-color: currentColor !important;
    width: 6px;
    height: 6px;
    top: 6px;
}

/* Month/daygrid dots */
.live-calendar-module .toastui-calendar-daygrid-event-dot,
.live-calendar-module .toastui-calendar-month-event-dot,
.live-calendar-module .toastui-calendar-daygrid-dot {
    display: inline-block !important;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor !important;
}

.live-calendar-module .toastui-calendar-daygrid-event {
    background-color: transparent !important;
    border-color: transparent !important;
    height: 6px !important;
    line-height: 6px !important;
    width: 6px !important;
    min-width: 6px !important;
    max-width: 6px !important;
    display: block !important;
    border-radius: 50% !important;
    background-color: currentColor !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1 !important;
    margin: 2px 0 !important;
}

.live-calendar-module .toastui-calendar-month-event {
    background-color: transparent !important;
    border-color: transparent !important;
    height: 6px !important;
    line-height: 6px !important;
    width: 6px !important;
    min-width: 6px !important;
    max-width: 6px !important;
    display: block !important;
    border-radius: 50% !important;
    background-color: currentColor !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1 !important;
    margin: 2px 0 !important;
}

.live-calendar-module .toastui-calendar-daygrid-event-title {
    display: none !important;
}

.live-calendar-module .toastui-calendar-month-event-title {
    display: none !important;
}

.live-calendar-module .toastui-calendar-daygrid-event::before,
.live-calendar-module .toastui-calendar-month-event::before {
    content: none !important;
}

.live-calendar-module .toastui-calendar-more {
    display: none !important;
}

.live-calendar-module .toastui-calendar-weekday-grid-row {
    min-height: 40px;
}

.live-calendar-module .toastui-calendar-weekday-grid-date {
    line-height: 16px;
}

.live-calendar-module .live-calendar-dots {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.live-calendar-module .live-calendar-dot {
    width: 100%;
    height: 3px;
    border-radius: 2px;
    display: inline-block;
}

.live-calendar-module .toastui-calendar-grid-cell-header {
    height: 18px !important;
}

.live-calendar-module .toastui-calendar-daygrid-cell {
    padding: 0 !important;
}

.live-calendar-module .toastui-calendar-event-layer {
    top: 18px !important;
    height: 14px !important;
    overflow: visible !important;
}

.live-calendar-module .toastui-calendar-month-week-item {
    min-height: 40px !important;
}

.live-calendar-module .toastui-calendar-month-daygrid {
    min-height: 240px !important;
}

/* FullCalendar Overrides */
.fc .fc-toolbar-title {
    font-size: 24px;
    font-weight: bold;
}

.fc .fc-button {
    text-transform: capitalize;
}

.fc-event {
    cursor: pointer;
}

.fc-event:hover {
    opacity: 0.85;
}

/* Responsive */
@media (max-width: 768px) {
    .live-calendar-container {
        padding: 10px;
    }
    
    .event-detail-title {
        font-size: 24px;
    }
    
    .event-detail-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .live-calendar-filters {
        padding: 10px;
    }
    
    .live-calendar-filter-item {
        display: block;
        margin-right: 0;
    }
    
    .event-list-item {
        flex-wrap: wrap;
    }
    
    .event-list-meta {
        flex-direction: column;
        gap: 6px !important;
    }
}

/* ========== List View ========== */
.live-calendar-list-view {
    padding: 20px 0;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.event-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.event-list-item:first-child {
    border-top: 1px solid #eee;
}

.event-list-item:hover {
    background-color: #f8f9fa;
    text-decoration: none;
    color: inherit;
}

.event-list-color {
    width: 6px;
    min-height: 40px;
    border-radius: 3px;
    flex-shrink: 0;
}

.event-list-content {
    flex: 1;
    min-width: 0;
}

.event-list-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
}

.event-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    font-size: 13px;
    color: #777;
}

.event-list-date i,
.event-list-allday i {
    margin-right: 4px;
    color: #999;
}

.event-list-category {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.event-list-arrow {
    flex-shrink: 0;
    color: #ccc;
    font-size: 14px;
}

.event-list-item:hover .event-list-arrow {
    color: #999;
}

/* ========== MODULE LIST VIEW (compact widget) ========== */
.live-calendar-module-list {
    padding: 0;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.module-list-heading {
    margin: 0;
    padding: 14px 15px 12px;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
}

.module-list-heading i {
    margin-right: 6px;
    color: #337ab7;
}

.module-event-list {
    display: flex;
    flex-direction: column;
}

.module-event-item {
    display: flex;
    align-items: stretch;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f2f2f2;
    transition: background-color 0.15s;
    position: relative;
}

.module-event-item:last-child {
    border-bottom: none;
}

.module-event-item:hover {
    background-color: #f7f9fc;
    text-decoration: none;
    color: inherit;
}

.module-event-color {
    width: 4px;
    flex-shrink: 0;
}

.module-event-body {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.module-event-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.module-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.module-event-date {
    font-size: 11px;
    color: #888;
    line-height: 1.2;
}

.module-event-date i {
    margin-right: 3px;
    font-size: 10px;
}

.module-event-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.2px;
}

.module-event-allday {
    background-color: #e8f4fd;
    color: #337ab7;
}

.module-event-arrow {
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: #ccc;
    font-size: 16px;
    flex-shrink: 0;
}

.module-event-item:hover .module-event-arrow {
    color: #999;
}

.module-event-empty {
    text-align: center;
    padding: 25px 15px;
    color: #aaa;
}

.module-event-empty i {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}

.module-event-empty p {
    margin: 0;
    font-size: 13px;
}

.module-event-all {
    display: block;
    text-align: center;
    padding: 11px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #337ab7;
    text-decoration: none;
    border-top: 2px solid #f0f0f0;
    transition: background-color 0.15s, color 0.15s;
}

.module-event-all:hover {
    background-color: #f0f5ff;
    color: #285e8e;
    text-decoration: none;
}

.module-event-all i {
    margin-left: 4px;
}
