/* Ferienwohnung Kalender Styles */
.ferienwohnung-kalender-widget {
    max-width: 100%;
    font-family: inherit;
    margin-bottom: 20px;
}

.ferienwohnung-kalender-title {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
}

.ferienwohnung-kalender-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.ferienwohnung-nav-btn {
    background: #16364A;
    color: white;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 100px;
    justify-content: center;
}

.ferienwohnung-nav-btn:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.ferienwohnung-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ferienwohnung-nav-btn.loading {
    pointer-events: none;
}

.ferienwohnung-current-month {
    font-weight: 600;
    font-size: 18px;
    text-align: center;
    min-width: 150px;
    color: #333;
}

.ferienwohnung-kalender-container {
    position: relative;
    background: white;
    margin-bottom: 0px;
    border-radius: 8px;
    overflow: hidden !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ferienwohnung-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(2px);
}

.ferienwohnung-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: ferienwohnung-spin 1s linear infinite;
}

@keyframes ferienwohnung-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ferienwohnung-kalender-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 0px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    transition: opacity 0.3s ease;
}

.ferienwohnung-kalender-table.loading {
    opacity: 0.6;
}

.ferienwohnung-kalender-table th {
    background: #f8f9fa;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #dee2e6;
    color: #495057;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ferienwohnung-kalender-table td {
    border: 1px solid #dee2e6;
    text-align: center;
    vertical-align: middle;
    position: relative;
    cursor: default;
    transition: all 0.2s ease;
    font-weight: 500;
    height: 45px;
}

.ferienwohnung-kalender-table td:hover:not(.other-month) {
    z-index: 5;
    /* box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.15); */
    z-index: 1;
}

.ferienwohnung-kalender-table td.frei {
    background-color: #e8f5e8;
    color: #2d5a2d;
}

.ferienwohnung-kalender-table td.belegt {
    background-color: #ffe8e8;
    color: #8b0000;
}

.ferienwohnung-kalender-table td.heute {
    font-weight: 700;
    border: 2px solid #0073aa;
    box-shadow: inset 0 0 0 1px #0073aa;
    position: relative;
}

.ferienwohnung-kalender-table td.heute::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: #0073aa;
    border-radius: 50%;
}

.ferienwohnung-kalender-table td.other-month {
    background-color: #f8f9fa;
    color: #adb5bd;
    opacity: 0.5;
}

.ferienwohnung-kalender-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.ferienwohnung-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.ferienwohnung-legend-color {
    width: 20px;
    height: 20px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: inline-block;
}

.ferienwohnung-legend-free {
    background-color: #e8f5e8;
}

.ferienwohnung-legend-booked {
    background-color: #ffe8e8;
}

.ferienwohnung-kalender-notice,
.ferienwohnung-error {
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.ferienwohnung-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ferienwohnung-kalender-navigation {
        justify-content: center;
        text-align: center;
    }
    
    .ferienwohnung-nav-btn {
        min-width: 80px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .ferienwohnung-current-month {
        font-size: 16px;
        min-width: 120px;
    }
    
    .ferienwohnung-kalender-table th,
    .ferienwohnung-kalender-table td {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    .ferienwohnung-kalender-table td {
        height: 40px;
    }
    
    .ferienwohnung-kalender-legend {
        gap: 20px;
        padding: 12px;
    }
    
    .ferienwohnung-legend-item {
        font-size: 13px;
    }
    
    .ferienwohnung-legend-color {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .ferienwohnung-kalender-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .ferienwohnung-nav-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .ferienwohnung-kalender-table th,
    .ferienwohnung-kalender-table td {
        padding: 6px 2px;
        font-size: 11px;
    }
    
    .ferienwohnung-kalender-table td {
        height: 35px;
    }
}

/* Mindestbuchungsdauer Styling */
.ferienwohnung-kalender-table td.belegt-mindestdauer {
    background-color: #fff3cd;
    color: #856404;
    position: relative;
    border: 1px solid #ffeaa7;
}


/* Tooltip Styling */
.ferienwohnung-kalender-table td[title]:hover::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

/* Legende für gesperrte Tage */
.ferienwohnung-legend-blocked {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    position: relative;
}


/* Mindestdauer Hinweis */
.ferienwohnung-kalender-notice {
    margin-top: 15px;
    padding: 0;
}

.ferienwohnung-min-duration-notice {
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 0;
    font-size: 14px;
    color: #0066cc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ferienwohnung-min-duration-notice i {
    font-size: 16px;
    color: #0066cc;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .ferienwohnung-min-duration-notice {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .ferienwohnung-min-duration-notice i {
        font-size: 14px;
    }
}

/* Legende Styling verbessern */
.ferienwohnung-kalender-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.ferienwohnung-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.ferienwohnung-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ccc;
    display: inline-block;
    position: relative;
}

.ferienwohnung-legend-text {
    color: #333;
    font-weight: 500;
}

@media (max-width: 768px) {
    .ferienwohnung-kalender-legend {
        gap: 10px;
    }
    
    .ferienwohnung-legend-item {
        font-size: 13px;
        gap: 5px;
    }
    
    .ferienwohnung-legend-color {
        width: 14px;
        height: 14px;
    }
}