/* Calendar Container */
#truform-calendar-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
    background: #FFFFFF;
}

/* Day Numbers */
.fc .fc-daygrid-day-top {
    flex-direction: row !important;
}

.fc-daygrid-day-number {
    font-size: 14px;
    color: #333;
    padding: 8px !important;
}

/* Event Boxes */
.fc-event {
    cursor: pointer !important;
    border: none !important;
    border-radius: 0px !important; /* Blocky as per image */
    padding: 2px 4px !important;
    margin: 1px 0 !important;
    font-size: 11px !important;
    color: #FFFFFF !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-event-title {
    font-weight: bold;
}

/* Calendar Header */
.fc-toolbar {
    margin-bottom: 20px !important;
}

.fc-toolbar-title {
    font-size: 1.6em !important;
    font-weight: 500;
    color: #333;
}

.fc-button {
    background: #FFFFFF !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    font-size: 18px !important; /* Fixed desktop/tablet size */
    padding: 6px 12px !important;
    text-transform: capitalize !important; /* Added capitalization */
}

/* Modern Color Picker for Admin */
.truform-color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

#event_box_color {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

#event_box_color::-webkit-color-swatch {
    border-radius: 50%;
    border: 3px solid #eee;
}

#event_box_color::-moz-color-swatch {
    border-radius: 50%;
    border: 3px solid #eee;
}

@media (max-width: 768px) {
    .fc .fc-toolbar {
        flex-direction: column !important;
        gap: 10px;
    }
    .fc-button {
        font-size: 16px !important; /* Mobile size */
    }
}

.fc-button:hover {
    background: #f5f5f5 !important;
}

.fc-button-active {
    background: #e6e6e6 !important;
    border-color: #ccc !important;
}

/* Table Design */
.fc-theme-standard td, .fc-theme-standard th {
    border: 1px solid #ddd !important;
}

.fc-col-header-cell {
    background: #f8f8f8;
    border-bottom: 1px solid #ddd !important;
}

.fc-col-header-cell-cushion {
    font-size: 12px;
    color: #555;
    text-transform: uppercase;
    font-weight: 400;
    padding: 8px 0 !important;
}

/* Popup Styles */
#truform-event-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #FFFFFF;
    z-index: 10001;
    width: 95%; /* Responsive width */
    max-width: 450px;
    max-height: 90vh; /* Prevent it from being taller than screen */
    overflow-y: auto; /* Scrollable if content is long */
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    border-top: 5px solid #b9f84c;
    font-family: sans-serif;
}

.truform-popup-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Better for long titles */
}

.truform-popup-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
    padding-right: 15px;
}

.truform-close-popup {
    cursor: pointer;
    font-size: 24px;
    color: #999;
    line-height: 1;
}

.truform-popup-content p {
    margin: 8px 0;
    font-size: 14px;
    color: #444;
}

.truform-popup-detail-row {
    display: flex;
    margin-bottom: 8px;
}

.truform-popup-label {
    width: 100px;
    flex-shrink: 0;
    font-weight: bold;
    color: #666;
    font-size: 13px;
}

.truform-popup-value {
    flex: 1;
    font-size: 13px;
    color: #333;
    overflow-x: auto; /* As requested */
    word-wrap: break-word; /* Ensure text wraps */
}

/* Overlay */
#truform-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10000;
}

/* Event List Widget Styling */
.truform-event-list-widget {
    background: #000000;
    color: #FFFFFF;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    margin-top: 20px;
}

.truform-event-list-widget h3 {
    color: #B9F84C;
    margin-top: 0;
    font-size: 1.2em;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.truform-event-list-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.truform-event-list-widget li {
    background: #1a1a1a;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 4px;
    transition: transform 0.2s;
}

.truform-event-list-widget li:hover {
    transform: translateX(5px);
}

.truform-event-list-widget .event-title {
    font-weight: bold;
    font-size: 1em;
}

.truform-event-list-widget .event-date {
    font-size: 0.85em;
    color: #999;
    margin-top: 4px;
}
