#ft-calendar-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin: 20px 0;
    font-family: var(--ft-font-family, inherit);
}

#ft-event-calendar {
    max-width: 1000px;
    margin: 0 auto;
}

.fc-toolbar-title {
    font-size: 1.5rem !important;
    font-weight: 700;
    color: var(--ft-accent-color, #333);
}

.fc-button-primary {
    background-color: var(--ft-primary-color, #ff5722) !important;
    border-color: var(--ft-primary-color, #ff5722) !important;
}

.fc-event {
    cursor: pointer;
    background-color: var(--ft-primary-color, #ff5722) !important;
    border: none !important;
    padding: 4px 8px;
    color: var(--ft-event-text-color, #ffffff) !important;
    font-weight: 600;
}

.fc-event-title,
.fc-event-time {
    color: var(--ft-event-text-color, #ffffff) !important;
    font-size: 0.9em;
}

.ft-calendar-icon {
    font-size: 16px !important;
    margin-right: 5px;
    vertical-align: middle;
    color: var(--ft-event-text-color, #ffffff) !important;
}

/* Ensure content is centered and visible */
.fc-event-main {
    display: flex;
    align-items: center;
    padding: 0 4px;
}

/* --- POPUP MODAL STYLES --- */
.ft-modal {
    display: none;
    position: fixed;
    z-index: 99999 !important;
    /* Ensure it's on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.ft-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    border-radius: 24px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    position: relative;
    border: none;
    font-family: var(--ft-font-family, inherit);
    animation: ftModalFadeIn 0.3s ease-out;
}

@keyframes ftModalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ft-close {
    color: #999;
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.ft-close:hover {
    color: var(--ft-primary-color, #ff5722);
}

#ft-detail-title {
    margin: 0 0 20px 0;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--ft-accent-color);
    line-height: 1.1;
}

#ft-detail-body p {
    margin: 15px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

#ft-detail-body p i {
    color: var(--ft-primary-color);
    font-size: 20px;
    width: 24px;
    text-align: center;
}

#ft-detail-description {
    white-space: pre-wrap;
    display: block;
    margin-top: 15px;
    color: #444;
    line-height: 1.6;
    background: #fdfdfd;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
}

#ft-detail-maps-wrapper {
    margin-top: 30px;
}

#ft-detail-maps-link {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 15px;
    background: var(--ft-primary-color);
    color: #fff !important;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: filter 0.2s;
}

#ft-detail-maps-link:hover {
    filter: brightness(110%);
}

.ft-event-button-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid var(--ft-primary-color);
    background: transparent;
    color: var(--ft-primary-color) !important;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 140px;
}

.ft-event-button-outline:hover {
    background: var(--ft-primary-color);
    color: #fff !important;
}

.ft-event-button-outline i {
    font-size: 18px;
}

@media (max-width: 480px) {
    #ft-detail-actions {
        flex-direction: column;
    }

    .ft-event-button-outline {
        width: 100%;
    }
}