/**
 * Styles für Kirchen Events Importer Plugin
 */

/* Container */
.kirchen-events-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 20px 0;
    color: #333;
}

/* Header mit View Switcher */
.kirchen-events-header {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 5px;
}

.view-switcher {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.view-btn {
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: #f0f0f0;
}

.view-btn.active {
    background: #004b8e;
    color: white;
    border-color: #004b8e;
}

/* Filter */
.kirchen-events-filter {
    background-color: #f8f8f8;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
}

.kirchen-events-filter form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #555;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
}

.filter-buttons {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.filter-buttons button {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.button-primary {
    background: #004b8e;
    color: white;
    border: 1px solid #004b8e;
}

.button-primary:hover {
    background: #003d7a;
}

.button {
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
}

.button:hover {
    background: #f0f0f0;
}

/* Kalender */
.kirchen-events-calendar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.kirchen-events-calendar.loading {
    opacity: 0.6;
    pointer-events: none;
}

.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #004b8e 0%, #0066cc 100%);
    color: white;
}

.nav-prev,
.nav-next {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.nav-prev:hover,
.nav-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.current-month {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.calendar-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.calendar-table th {
    padding: 15px 10px;
    background: #f5f5f5;
    text-align: center;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
    width: 14.285714%; /* Genau 1/7 für gleiche Spaltenbreite */
}

.calendar-table td {
    border: 1px solid #e0e0e0;
    height: 100px;
    vertical-align: top;
    width: 14.285714%; /* Genau 1/7 für gleiche Spaltenbreite */
    position: relative;
    background: white;
    padding: 5px;
}

.calendar-table tbody tr:first-child td {
    border-top: none;
}

.empty-day {
    background: #fafafa;
}

.calendar-day {
    transition: background 0.3s ease;
}

.calendar-day.has-events {
    cursor: pointer;
}

.calendar-day.has-events:hover {
    background: #f0f6ff;
}

.calendar-day.today {
    background: #fffbf0;
}

.calendar-day.today .day-number {
    background: #ffcb3d;
    color: #333;
}

.day-number {
    display: inline-block;
    padding: 4px 8px;
    font-weight: 600;
    font-size: 18px;
    border-radius: 4px;
}

.day-events-preview {
    margin-top: 5px;
    padding: 4px;
}

.event-count {
    display: inline-block;
    padding: 3px 6px;
    background: #004b8e;
    color: white;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
}

/* Liste */
.kirchen-events-list {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.events-date-group {
    margin-bottom: 30px;
}

.events-date {
    font-size: 18px;
    font-weight: 600;
    color: #004b8e;
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #004b8e;
}

.event-item {
    display: flex;
    gap: 20px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f9f9f9;
    border-left: 4px solid #004b8e;
    border-radius: 4px;
}

.event-time {
    flex: 0 0 120px;
    font-weight: 600;
    color: #a31330;
    font-size: 18px;
}

.event-content {
    flex: 1;
}

.event-title {
    margin: 0 0 10px 0;
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

.event-location {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.event-description {
    font-size: 16px;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.5;
}

.event-details-btn {
    display: inline-block;
    padding: 6px 12px;
    background: #004b8e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.event-details-btn:hover {
    background: #003d7a;
}

/* Modal */
.event-details-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 9999999 !important;
    display: none;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000000;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    background: transparent;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10000001;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

.modal-body h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #004b8e;
    font-size: 20px;
    padding-right: 50px;
}

.modal-events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.event-details {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #004b8e;
}

.event-details h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.detail-row {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.detail-row strong {
    color: #555;
    display: inline-block;
    margin-right: 5px;
}

.event-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #004b8e;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.event-link:hover {
    background: #003d7a;
}

.modal-body hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 20px 0;
}

/* Loading */
.loading-indicator {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.loading-indicator::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #004b8e;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 20px;
    background: #fee;
    color: #c33;
    border-radius: 4px;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .kirchen-events-container {
        margin: 10px 0;
    }
    
    .kirchen-events-header {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .kirchen-events-filter {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .kirchen-events-filter form {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group label {
        font-size: 13px;
    }
    
    .filter-group select {
        padding: 10px;
        font-size: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .filter-buttons {
        margin-top: 5px;
    }
    
    .filter-buttons button {
        flex: 1;
        padding: 12px 15px;
        font-size: 15px;
    }
    
    /* Kalender Mobile */
    .calendar-navigation {
        padding: 12px 15px;
    }
    
    .current-month {
        font-size: 16px;
    }
    
    .nav-prev,
    .nav-next {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .calendar-table th {
        padding: 8px 3px;
        font-size: 11px;
    }
    
    .calendar-table td {
        height: 70px;
        font-size: 11px;
        padding: 3px;
    }
    
    .day-number {
        font-size: 14px;
        padding: 3px 5px;
    }
    
    .day-events-preview {
        margin-top: 3px;
    }
    
    .event-count {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    /* Liste Mobile */
    .kirchen-events-list {
        padding: 15px;
    }
    
    .events-date {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .event-item {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .event-time {
        flex: unset;
        font-size: 16px;
        padding-bottom: 5px;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .event-title {
        font-size: 16px;
    }
    
    .event-location {
        font-size: 14px;
    }
    
    .event-details-btn {
        width: 100%;
        padding: 10px 15px;
        font-size: 15px;
        margin-top: 5px;
    }
    
    /* Modal Mobile */
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-body {
        padding: 20px 15px;
    }
    
    .modal-body h3 {
        font-size: 18px;
        padding-right: 40px;
    }
    
    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 24px;
    }
    
    .event-details {
        padding: 15px;
    }
    
    .event-details h4 {
        font-size: 16px;
    }
    
    .detail-row {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    /* View Switcher Mobile */
    .view-switcher {
        flex-direction: row;
        gap: 8px;
    }
    
    .view-btn {
        flex: 1;
        padding: 12px 15px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .kirchen-events-header {
        padding: 8px;
    }
    
    .kirchen-events-filter {
        padding: 12px;
    }
    
    .filter-group select {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .calendar-navigation {
        padding: 10px;
        position: relative;
    }
    
    .current-month {
        font-size: 14px;
    }
    
    .nav-prev,
    .nav-next {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .calendar-table th {
        padding: 6px 2px;
        font-size: 10px;
    }
    
    .calendar-table td {
        height: 60px;
        padding: 2px;
    }
    
    .day-number {
        font-size: 12px;
        padding: 2px 4px;
    }
    
    .event-count {
        font-size: 8px;
        padding: 1px 3px;
    }
    
    .kirchen-events-list {
        padding: 10px;
    }
    
    .events-date {
        font-size: 15px;
    }
    
    .event-item {
        padding: 10px;
    }
    
    .event-time {
        font-size: 15px;
    }
    
    .event-title {
        font-size: 15px;
    }
    
    .event-location {
        font-size: 13px;
    }
    
    .event-details-btn {
        padding: 10px;
        font-size: 14px;
    }
    
    .modal-body {
        padding: 15px 12px;
    }
    
    .modal-body h3 {
        font-size: 16px;
        padding-right: 35px;
    }
    
    .modal-close {
        font-size: 22px;
    }
    
    .event-details {
        padding: 12px;
    }
    
    .event-details h4 {
        font-size: 15px;
    }
    
    .detail-row {
        font-size: 13px;
    }
    
    .event-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .view-btn {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .filter-buttons button {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* Custom Anpassungen */
h3.current-month.fusion-responsive-typography-calculated {
    color: #FFFFFF !important;
}