/**
 * FBM Calendar CSS - Exakt wie im Backup
 * Kopiert vom Original Journal Module
 */

/* Calendar - Wie im Screenshot */
.fbm-journal-calendar {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    overflow: hidden;
}

.fbm-journal-calendar-header {
    background: #2d5be3;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
}

.fbm-journal-calendar-nav {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.fbm-journal-calendar-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.fbm-journal-calendar-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.fbm-journal-calendar-grid {
    padding: 20px;
}

.fbm-journal-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.fbm-journal-calendar-weekday {
    text-align: center;
    font-weight: 600;
    color: #6c757d;
    font-size: 0.9rem;
    padding: 8px 0;
}

.fbm-journal-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    min-height: 200px;
}

.fbm-journal-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #f8f9fa;
    color: #495057;
    font-weight: 500;
}

.fbm-journal-calendar-day:hover {
    background: #e9ecef;
}

.fbm-journal-calendar-day.today {
    background: #fff3cd;
    color: #856404;
    font-weight: 700;
}

.fbm-journal-calendar-day.has-entry {
    background: #d4edda;
    color: #155724;
}

.fbm-journal-calendar-day.empty {
    background: transparent;
    cursor: default;
}

.entry-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: #28a745;
    border-radius: 50%;
}

/* Calendar Loading Animation */
.fbm-journal-calendar.loading {
    opacity: 0.6;
    pointer-events: none;
}

.fbm-journal-calendar.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #2d5be3;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: calendar-spin 1s linear infinite;
}

@keyframes calendar-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tooltip Styles */
.fbm-calendar-tooltip {
    position: absolute;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 1000;
    max-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.fbm-calendar-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.fbm-calendar-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: #333;
}

/* Modal Styles */
.fbm-calendar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fbm-calendar-modal-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.fbm-calendar-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.fbm-calendar-modal-close:hover {
    color: #333;
}

.fbm-calendar-modal h3 {
    margin: 0 0 15px 0;
    color: #2d5be3;
    font-size: 18px;
}

.fbm-calendar-entries-list {
    margin-top: 15px;
}

.fbm-calendar-entry-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.fbm-calendar-entry-item h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 14px;
}

.fbm-calendar-entry-item p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.entry-type {
    background: #2d5be3;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    text-transform: uppercase;
}

/* Loading Animation */
.fbm-journal-calendar.loading {
    opacity: 0.7;
    pointer-events: none;
}

.fbm-journal-calendar.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2d5be3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .fbm-journal-calendar-grid {
        padding: 15px;
    }
    
    .fbm-journal-calendar-day {
        font-size: 0.9rem;
    }
    
    .fbm-calendar-modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}
