/* ============================================
   Kalender Admin Styles
   ============================================ */

.simpbook-calendar-container {
    margin: 20px 0;
    background: #fff;
    padding: 20px;
        border: 2px solid #1a4a8a;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.simpbook-calendar-filters {
    margin-bottom: 20px;
    padding: 20px;
    background: #f9f9f9;
        border: 2px solid #1a4a8a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

/* Mobile Filter Toggle Button - Hidden on Desktop */
.simpbook-calendar-filters .filter-toggle-button {
    display: none;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.simpbook-calendar-filters .filter-toggle-button:hover {
    background: #135e96;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.simpbook-calendar-filters .filter-toggle-button .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.simpbook-calendar-filters .filter-toggle-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.simpbook-calendar-filters .filter-toggle-button[aria-expanded="true"] .filter-toggle-icon {
    transform: rotate(180deg);
}

.simpbook-calendar-filters .filter-options {
    display: contents;
}

.simpbook-calendar-filters label {
    margin-right: 10px;
    font-weight: 600;
    color: #23282d;
    white-space: nowrap;
}

.simpbook-calendar-filters select {
    margin-right: 20px;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.simpbook-calendar-filters select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.simpbook-calendar-filters .button {
    transition: background-color 0.2s, border-color 0.2s;
    margin-top: 0 !important;
}

#apply-filters {
    margin-top: 0 !important;
}

/* FullCalendar Anpassungen */
.fc-event {
    cursor: pointer;
    border-radius: 3px;
    padding: 2px 5px;
}

.fc-event:hover {
    opacity: 0.9;
}

.fc-event.storniert {
    opacity: 0.5;
    text-decoration: line-through;
}

.fc-event-title {
    font-weight: 500;
}

/* Calendar Toolbar */
.fc-toolbar {
    margin-bottom: 20px;
}

.fc-button {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    text-shadow: none;
    box-shadow: none;
}

.fc-button:hover {
    background: #135e96;
    border-color: #135e96;
}

.fc-button-active {
    background: #135e96;
    border-color: #135e96;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .simpbook-admin-wrap {
        max-width: 100%;
    }
    
    .simpbook-calendar-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    .simpbook-calendar-filters {
        padding: 15px;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
    }
    
    .simpbook-calendar-filters label {
        margin-right: 10px;
        margin-bottom: 0;
        white-space: nowrap;
    }
    
    .simpbook-calendar-filters select {
        margin-right: 15px;
        margin-bottom: 0;
        min-width: 180px;
        flex: 0 1 auto;
        margin-left: 5px !important;
        margin-right: 5px !important;
    }
    
    .simpbook-calendar-filters .button {
        margin-right: 10px;
        margin-bottom: 0;
        margin-top: 0 !important;
    }
    
    .fc-toolbar {
        flex-wrap: wrap;
    }
    
    .fc-toolbar-chunk {
        margin-bottom: 10px;
    }
    
    .fc-button-group {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .fc-toolbar-title {
        font-size: 1.4em;
        text-transform: capitalize !important;
    }
    
    .fc-daygrid-day {
        min-height: 80px;
    }
    
    .fc-event {
        font-size: 11px;
        padding: 2px 4px;
        line-height: 1.3;
    }
}

@media (max-width: 782px) {
    .simpbook-calendar-container {
        padding: 10px;
        margin: 10px 0;
        border-radius: 8px;
    }
    
    .simpbook-calendar-filters {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        gap: 12px;
    }
    
    /* Show Mobile Filter Toggle */
    .simpbook-calendar-filters .filter-toggle-button {
        display: flex !important;
    }
    
    /* Hide and collapse filter panel by default on mobile */
    .simpbook-calendar-filters .filter-options {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
        margin-top: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
        width: 100%;
        align-items: center;
    }
    
    /* Show filter panel when expanded */
    .simpbook-calendar-filters .filter-options.show {
        max-height: 1000px;
        opacity: 1;
        margin-top: 15px;
    }
    
    .simpbook-calendar-filters label {
        display: block;
        margin-bottom: 5px;
        margin-right: 0;
        font-size: 14px;
        text-align: center;
        width: 90%;
        max-width: 300px;
    }
    
    .simpbook-calendar-filters select {
        display: block;
        width: 90%;
        max-width: 300px;
        margin-right: 0;
        margin-bottom: 0;
        min-width: auto;
        padding: 8px;
        font-size: 14px;
    }
    
    .simpbook-calendar-filters .button {
        width: auto;
        max-width: 90%;
        min-width: 200px;
        margin-right: 0;
        margin-bottom: 8px;
        margin-top: 0 !important;
        padding: 8px 16px;
        text-align: center;
        font-size: 13px;
    }
    
    .simpbook-calendar-filters .button:last-child {
        margin-bottom: 0;
    }
    
    #apply-filters {
        margin-top: 10px !important;
    }
    
    /* FullCalendar Toolbar für mobile */
    .fc-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .fc-toolbar-chunk {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 0;
    }
    
    .fc-toolbar-chunk:first-child {
        order: 2;
    }
    
    .fc-toolbar-chunk:nth-child(2) {
        order: 1;
    }
    
    .fc-toolbar-chunk:last-child {
        order: 3;
    }
    
    .fc-button {
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 4px;
    }
    
    .fc-button-group {
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 5px;
    }
    
    .fc-button-group .fc-button {
        flex: 1;
        min-width: 0;
    }
    
    .fc-toolbar-title {
        font-size: 1.2em;
        text-align: center;
        width: 100%;
    }
    
    /* Calendar View Anpassungen für mobile */
    .fc-daygrid-day {
        min-height: 60px;
    }
    
    .fc-daygrid-day-top {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .fc-daygrid-day-number {
        font-size: 12px;
        padding: 2px 4px;
    }
    
    .fc-col-header-cell {
        padding: 5px 2px;
    }
    
    .fc-col-header-cell-cushion {
        font-size: 11px;
    }
    
    .fc-event {
        font-size: 10px;
        padding: 1px 3px;
        margin-bottom: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .fc-event-title {
        font-size: 10px;
    }
    
    /* Week und Day View für mobile */
    .fc-timeGridWeek-view .fc-timegrid-slot,
    .fc-timeGridDay-view .fc-timegrid-slot {
        height: 2em !important;
    }
    
    .fc-timeGridWeek-view .fc-timegrid-event,
    .fc-timeGridDay-view .fc-timegrid-event {
        font-size: 11px;
        padding: 2px 4px;
    }
    
    /* Scrollbar für mobile */
    .fc-scroller {
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .simpbook-calendar-container {
        padding: 8px;
        margin: 8px 0;
    }
    
    .simpbook-calendar-filters {
        padding: 12px;
    }
    
    .fc-toolbar-title {
        font-size: 1em;
    }
    
    .fc-button {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .fc-daygrid-day {
        min-height: 50px;
    }
    
    .fc-event {
        font-size: 9px;
        padding: 1px 2px;
    }
    
    .fc-daygrid-day-number {
        font-size: 11px;
    }
    
    .fc-col-header-cell-cushion {
        font-size: 10px;
    }
}

/* ============================================
   Kalender-Abonnement Sektion Styles
   ============================================ */

.simpbook-calendar-subscribe-section {
	background: linear-gradient(135deg, #667eea 0%, #20c997 100%) !important;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	margin-top: 30px;
}

.simpbook-calendar-subscribe-section h2 {
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Toggle Logic for Calendar Subscription */
.simpbook-calendar-subscribe-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.3s ease;
    opacity: 0;
}

.simpbook-toggle-checkbox:checked ~ .simpbook-calendar-subscribe-content {
    max-height: 2000px; /* Large enough to fit content */
    opacity: 1;
    margin-top: 20px;
}

.simpbook-toggle-checkbox:checked ~ .simpbook-toggle-label .dashicons-arrow-down-alt2 {
    transform: rotate(180deg);
}

.simpbook-toggle-label {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Kacheln mit Texten in der Kalender-Abonnement Sektion */
.simpbook-calendar-subscribe-info,
#simpbook-calendar-subscribe-form,
#calendar-url-result {
	background: rgba(255, 255, 255, 0.15) !important;
	border-radius: 8px;
	color: #fff;
}

.simpbook-calendar-subscribe-info {
	padding: 20px;
	margin-bottom: 20px;
	border-left: 4px solid rgba(255, 255, 255, 0.5);
}

.simpbook-calendar-subscribe-info p {
	color: #fff;
}

.simpbook-calendar-subscribe-info p[style*="color: #d63638"] {
	color: rgba(255, 255, 255, 0.9) !important;
	font-weight: 600;
}

.simpbook-calendar-subscribe-info p[style*="color: #666"] {
	color: rgba(255, 255, 255, 0.85) !important;
}

#simpbook-calendar-subscribe-form {
	padding: 20px;
}

#simpbook-calendar-subscribe-form label {
	color: #fff;
}

#simpbook-calendar-subscribe-form select {
	background: rgba(255, 255, 255, 0.95);
	color: #23282d;
}

#calendar-url-result {
	margin-top: 20px;
	padding: 20px;
	border-left: 4px solid rgba(255, 255, 255, 0.5);
}

#calendar-url-result h3 {
	color: #fff;
}

#calendar-url-result p {
	color: rgba(255, 255, 255, 0.9);
}

#calendar-url-display {
	background: rgba(255, 255, 255, 0.25) !important;
	color: #fff;
	padding: 12px;
	border-radius: 4px;
	word-break: break-all;
	font-family: monospace;
	font-size: 13px;
	margin-bottom: 15px;
}

#calendar-app-instructions {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.9);
}

#calendar-url-result h3 {
	margin-top: 0;
}

#calendar-url-result p {
	margin-bottom: 10px;
}

