/* 2025 Floating Widget Styles */
.dpfp-event-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100000;
    /* Increased to sit above Sticky Banner (99999) */
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px 10px 14px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateY(0);
    overflow: hidden;
}

.dpfp-event-fab:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.85);
}

.dpfp-event-fab:active {
    transform: translateY(0) scale(0.98);
}

.dpfp-fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    border-radius: 50%;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
    position: relative;
    z-index: 2;
}

.dpfp-fab-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: #333;
    font-family: 'Futura', 'Helvetica Neue', sans-serif;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #333, #555);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 2;
}

/* Subtle internal glow/shine animation */
.dpfp-fab-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 60%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.5s, transform 0.5s;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.dpfp-event-fab:hover .dpfp-fab-glow {
    opacity: 1;
    transform: scale(1);
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .dpfp-event-fab {
        bottom: 15px;
        right: 15px;
        padding: 8px 14px 8px 10px;
    }

    .dpfp-fab-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    @media (max-width: 480px) {
        .dpfp-event-fab {
            bottom: 15px;
            right: 15px;
            padding: 8px 14px 8px 10px;
        }

        .dpfp-fab-icon {
            width: 28px;
            height: 28px;
            font-size: 0.8rem;
        }

        .dpfp-fab-label {
            font-size: 0.8rem;
        }
    }

    /* Lift Widget when Sticky Banner is present */
    body.has-sticky-banner .dpfp-event-fab {
        bottom: 90px !important;
        transition: bottom 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    /* Birthday Calendar Modal */
    .birthday-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 110000;
        /* Increased to sit above everything */
        display: none;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .birthday-modal-overlay.is-visible {
        display: flex;
        opacity: 1;
    }

    .birthday-modal-container {
        background: #fff;
        width: 90%;
        max-width: 600px;
        max-height: 90vh;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        position: relative;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        transform: translateY(20px);
        transition: transform 0.3s ease;
    }

    .birthday-modal-overlay.is-visible .birthday-modal-container {
        transform: translateY(0);
    }

    .birthday-modal-close {
        position: absolute;
        top: 10px;
        right: 15px;
        background: none;
        border: none;
        font-size: 2rem;
        line-height: 1;
        color: #666;
        cursor: pointer;
        z-index: 10;
    }

    .birthday-modal-header {
        padding: 20px;
        border-bottom: 1px solid #eee;
        text-align: center;
        background: linear-gradient(to right, #fdfbfb, #ebedee);
    }

    .birthday-modal-header h2 {
        margin: 0 0 15px 0;
        font-size: 1.25rem;
        color: #333;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .birthday-modal-header h2 i {
        color: #ff6b6b;
    }

    .birthday-calendar-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
    }

    .calendar-nav-btn {
        background: none;
        border: none;
        font-size: 1.2rem;
        color: #555;
        cursor: pointer;
        padding: 5px 10px;
        transition: color 0.2s;
    }

    .calendar-nav-btn:hover {
        color: #000;
    }

    #calendar-current-month-label {
        font-size: 1.2rem;
        font-weight: bold;
        min-width: 100px;
    }

    .birthday-modal-body {
        padding: 20px;
        overflow-y: auto;
        flex: 1;
    }

    /* Calendar Grid */
    .birthday-calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 5px;
        margin-bottom: 20px;
    }

    .calendar-header-cell {
        text-align: center;
        font-weight: bold;
        font-size: 0.8rem;
        color: #777;
        padding-bottom: 5px;
    }

    .calendar-cell {
        aspect-ratio: 1;
        border: 1px solid #eee;
        border-radius: 4px;
        padding: 5px;
        position: relative;
        cursor: default;
        background: #fff;
        font-size: 0.9rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        overflow: hidden;
        /* Prevent content from pushing bounds */
        min-width: 0;
        /* Allow flex/grid shrink */
    }

    .calendar-cell.has-birthday {
        background-color: #fff0f0;
        cursor: pointer;
        border-color: #ffcccc;
    }

    .calendar-cell.today {
        border: 2px solid #ff6b6b;
    }

    .calendar-cell.empty {
        background: transparent;
        border: none;
    }

    .calendar-date {
        margin-bottom: 2px;
    }

    .birthday-marker {
        font-size: 0.7rem;
        color: #ff6b6b;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .birthday-count-badge {
        background: #ff6b6b;
        color: #fff;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 2px;
    }

    /* Detail Section */
    .birthday-detail-section {
        background: #f9f9f9;
        padding: 15px;
        border-radius: 8px;
        border: 1px solid #eee;
        animation: fadeIn 0.3s ease;
    }

    .birthday-detail-section h3 {
        margin: 0 0 10px 0;
        font-size: 1rem;
        border-bottom: 2px solid #ddd;
        padding-bottom: 5px;
    }

    .birthday-member-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 0;
        border-bottom: 1px solid #eee;
        text-decoration: none;
        color: inherit;
        transition: background 0.2s;
    }

    .birthday-member-item:last-child {
        border-bottom: none;
    }

    .birthday-member-item:hover {
        background: rgba(0, 0, 0, 0.02);
    }

    .birthday-member-thumb {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
        background: #ddd;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        color: #fff;
    }

    .birthday-member-info {
        flex: 1;
        /* Take remaining space */
        min-width: 0;
        /* Allow truncation */
    }

    .birthday-member-info div {
        line-height: 1.3;
    }

    .birthday-member-name {
        font-weight: bold;
        color: #043e80;
    }

    .birthday-member-meta {
        font-size: 0.8rem;
        color: #666;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(5px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Header Integration */
    .birthday-menu-btn {
        display: flex;
        align-items: center;
        color: #333;
        /* Start dark, maybe changed by standard styles */
        font-size: 1.2rem;
        padding: 0 10px;
        cursor: pointer;
        transition: color 0.3s;
    }

    .birthday-menu-btn:hover {
        color: #ff6b6b;
    }

    /* Mobile Styling injection */
    @media (max-width: 768px) {
        .birthday-modal-container {
            width: 95%;
            max-height: 80vh;
        }

        .calendar-cell {
            font-size: 0.8rem;
            padding: 2px;
        }

        .birthday-count-badge {
            width: 14px;
            height: 14px;
            font-size: 0.5rem;
        }
    }



    /* Schedule Integration */
    .schedule-marker-container {
        margin-top: 2px;
        font-size: 0.7rem;
        color: #0073aa;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
        width: 100%;
        /* Ensure full width for truncation */
        overflow: hidden;
        /* Hide overflow */
    }

    .schedule-icon {
        flex-shrink: 0;
        /* Icon always shows */
    }

    .schedule-speaker-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        font-size: 0.65rem;
    }

    .calendar-cell.has-event {
        background-color: #f0f7ff;
        cursor: pointer;
    }

    .calendar-cell.has-birthday.has-schedule {
        /* Mixed? maybe light purple? */
        background: linear-gradient(135deg, #fff0f0 50%, #f0f7ff 50%);
    }

    .detail-section-title {
        font-size: 0.9rem;
        font-weight: bold;
        color: #555;
        margin: 10px 0 5px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .detail-section-separator {
        height: 1px;
        background: #eee;
        margin: 10px 0;
    }