/* Calendar Public Styles */

.fddm-calendar-wrapper {
    max-width: 100%;
    margin: 20px 0;
    min-height: 500px;
}

/* Single Event */
.fddm-single-event-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.fddm-event-meta {
    background: #f9f9f9;
    padding: 15px;
    border-left: 4px solid #0073aa;
    margin-bottom: 20px;
}

.fddm-event-documents {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* List View */
.fddm-calendar-list {
    margin: 20px 0;
}

.fddm-calendar-list ul {
    list-style: none;
    padding: 0;
}

.fddm-calendar-list li {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.fddm-event-date-badge {
    width: 60px;
    text-align: center;
    background: #f0f0f1;
    border-radius: 4px;
    padding: 5px;
    margin-right: 15px;
}

.fddm-event-date-badge .fddm-month {
    display: block;
    text-transform: uppercase;
    font-size: 0.8em;
    font-weight: bold;
}

.fddm-event-date-badge .fddm-day {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
}

.fddm-event-details h3 {
    margin: 0 0 5px;
}

/* Subscribe Button */
.fddm-calendar-header-actions {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.fddm-button-subscribe {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    background-color: #f7f7f7;
    border: 1px solid #ccc;
    color: #555;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.fddm-button-subscribe:hover {
    background-color: #eee;
    color: #333;
    border-color: #999;
}

.fddm-button-subscribe .dashicons {
    margin-right: 5px;
    font-size: 18px;
    width: 18px;
    height: 18px;
}


/* Calendar Container */
.fddm-calendar-wrapper {
    width: 100%;
    max-width: 100%;
}

#fddm-calendar-month-view {
    width: 100%;
    min-height: 600px;
}

/* FullCalendar Event Display - Balanced approach */
.fc-daygrid-event {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Allow wrapping on hover/focus for full visibility */
.fc-daygrid-event:hover,
.fc-daygrid-event:focus {
    white-space: normal;
    overflow: visible;
    z-index: 10;
    position: relative;
}


/* Event Details Modal */
.fddm-modal {
    display: none;
    position: fixed;
    z-index: 2147483647;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
}

.fddm-modal-content {
    background-color: #ffffff;
    margin: auto;
    padding: 0;
    border: 3px solid #b71c1c;
    border-radius: 0;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.fddm-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 20px;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: all 0.2s ease;
    font-weight: bold;
    z-index: 10;
    line-height: 1;
}

.fddm-modal-close:hover,
.fddm-modal-close:focus {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.fddm-modal-close:active {
    transform: scale(0.95);
}

#fddm-modal-body {
    padding: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #1f2937;
    font-family: Georgia, "Times New Roman", serif;
    overflow-y: auto;
    flex: 1;
}

.fddm-event-modal-inner {
    padding: 24px 28px 32px;
}

.fddm-modal-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.fddm-event-modal-title {
    margin: 0;
    padding: 20px 24px;
    background: #b71c1c;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid #b71c1c;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    display: block;
    text-align: left;
}

.fddm-event-modal-meta {
    background: #f9f9f9;
    padding: 15px;
    border-left: 4px solid #0073aa;
    margin-bottom: 20px;
}

.fddm-event-modal-meta p {
    margin: 5px 0;
}

.fddm-event-modal-description {
    margin: 20px 0;
    line-height: 1.6;
}

.fddm-event-modal-documents {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #e53935 0%, #b71c1c 100%);
    border-radius: 10px;
    color: white;
}

.fddm-documents-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.fddm-documents-icon {
    color: white;
    flex-shrink: 0;
}

.fddm-documents-header h3 {
    font-size: 18px;
    margin: 0;
    flex-grow: 1;
    color: white;
}

.fddm-documents-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.fddm-documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.fddm-document-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    text-decoration: none;
    color: #ffffff !important;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: default;
}

.fddm-doc-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.fddm-doc-action-icon {
    color: #ffffff !important;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fddm-doc-action-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.fddm-doc-action-icon .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.fddm-doc-title {
    flex-grow: 1;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff !important;
    text-decoration: none;
}

.fddm-doc-title:hover {
    text-decoration: underline !important;
}

.fddm-document-card *,
.fddm-document-card svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
}

.fddm-document-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fddm-doc-icon {
    flex-shrink: 0;
    color: white;
}

.fddm-doc-title-legacy {
    flex-grow: 1;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.fddm-event-modal-documents a:hover {
    text-decoration: underline;
}