/**
 * Termine Management Plugin Styles
 * 
 * @package TermineManagement
 * @version 1.0.0
 */

/* Termine Calendar */
.termine-calendar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.calendar-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.calendar-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.calendar-nav {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.calendar-grid {
    padding: 1rem;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 1rem;
}

.weekday {
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: #666;
    background: #f8f9fa;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e9ecef;
}

.calendar-day {
    background: white;
    min-height: 100px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.calendar-day:hover {
    background: #f8f9ff;
}

.calendar-day.other-month {
    background: #f8f9fa;
    color: #999;
}

.day-number {
    font-weight: 600;
    font-size: 0.9rem;
}

.day-termine {
    margin-top: 0.25rem;
}

.day-termin {
    background: #667eea;
    color: white;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-size: 0.75rem;
    margin-bottom: 0.125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-termin.abitur {
    background: #dc3545;
}

.day-termin.msa {
    background: #fd7e14;
}

.day-termin.ferien {
    background: #28a745;
}

.day-termin.feiertag {
    background: #6f42c1;
}

.calendar-legend {
    padding: 1rem;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.legend-color.abitur {
    background: #dc3545;
}

.legend-color.msa {
    background: #fd7e14;
}

.legend-color.ferien {
    background: #28a745;
}

.legend-color.feiertag {
    background: #6f42c1;
}

/* Termine List */
.termine-list {
    display: grid;
    gap: 1rem;
}

.termin-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 4px solid #667eea;
}

.termin-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.termin-item.abitur {
    border-left-color: #dc3545;
}

.termin-item.msa {
    border-left-color: #fd7e14;
}

.termin-item.ferien {
    border-left-color: #28a745;
}

.termin-item.feiertag {
    border-left-color: #6f42c1;
}

.termin-item {
    display: flex;
    align-items: stretch;
}

.termin-date {
    background: #f8f9fa;
    padding: 1rem;
    text-align: center;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.date-day {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.date-month {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
}

.date-year {
    font-size: 0.8rem;
    color: #999;
}

.termin-content {
    flex: 1;
    padding: 1rem;
}

.termin-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #333;
}

.termin-description {
    margin: 0 0 0.75rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.termin-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #666;
}

.termin-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.termin-meta i {
    width: 12px;
    text-align: center;
}

/* Next Termine */
.next-termine {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

.next-termine h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

.next-termine-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.next-termin-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.next-termin-item:last-child {
    border-bottom: none;
}

.next-termin-item.abitur {
    border-left: 3px solid #dc3545;
    padding-left: 0.75rem;
}

.next-termin-item.msa {
    border-left: 3px solid #fd7e14;
    padding-left: 0.75rem;
}

.next-termin-item.ferien {
    border-left: 3px solid #28a745;
    padding-left: 0.75rem;
}

.next-termin-item .termin-date {
    font-weight: 600;
    color: #667eea;
    min-width: 80px;
}

.next-termin-item .termin-title {
    flex: 1;
    color: #333;
}

.next-termin-item .termin-subject {
    font-size: 0.85rem;
    color: #666;
}

/* Countdown */
.termine-countdown {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: center;
}

.countdown-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
}

.countdown-header h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
}

.countdown-header p {
    margin: 0;
    opacity: 0.9;
}

.countdown-timer {
    padding: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.countdown-item {
    text-align: center;
}

.countdown-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    line-height: 1;
}

.countdown-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.countdown-date {
    padding: 1rem;
    background: #f8f9fa;
    color: #666;
    font-weight: 600;
}

.countdown-expired {
    color: #28a745;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 2rem;
}

/* Filters */
.termine-filters {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Modal */
.day-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.detail-termin {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    color: white;
}

.detail-termin.abitur {
    background: #dc3545;
}

.detail-termin.msa {
    background: #fd7e14;
}

.detail-termin.ferien {
    background: #28a745;
}

.detail-termin.feiertag {
    background: #6f42c1;
}

/* Loading */
.termine-loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Notifications */
.termine-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.termine-notification.show {
    transform: translateX(0);
}

.termine-notification-success {
    background: #28a745;
}

.termine-notification-error {
    background: #dc3545;
}

.termine-notification-warning {
    background: #ffc107;
    color: #333;
}

.termine-notification-info {
    background: #17a2b8;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* No Termine */
.no-termine {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calendar-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .calendar-title {
        font-size: 1.2rem;
    }

    .calendar-nav {
        width: 35px;
        height: 35px;
    }

    .calendar-days {
        gap: 0;
    }

    .calendar-day {
        min-height: 80px;
        padding: 0.25rem;
    }

    .day-number {
        font-size: 0.8rem;
    }

    .day-termin {
        font-size: 0.7rem;
        padding: 0.1rem 0.2rem;
    }

    .calendar-legend {
        gap: 1rem;
        font-size: 0.8rem;
    }

    .legend-color {
        width: 12px;
        height: 12px;
    }

    .termin-item {
        flex-direction: column;
    }

    .termin-date {
        flex-direction: row;
        justify-content: center;
        gap: 0.5rem;
        min-width: auto;
        padding: 0.75rem;
    }

    .date-day {
        font-size: 1.2rem;
    }

    .termin-content {
        padding: 1rem;
    }

    .termin-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .countdown-timer {
        gap: 1rem;
        padding: 1.5rem;
    }

    .countdown-number {
        font-size: 2rem;
    }

    .countdown-item {
        min-width: 60px;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .termine-notification {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
        transform: translateY(-100%);
    }

    .termine-notification.show {
        transform: translateY(0);
    }
}

/* Print Styles */
@media print {
    .calendar-nav,
    .termine-filters,
    .modal-close,
    .termine-notification,
    .loading-spinner {
        display: none !important;
    }

    .termine-calendar,
    .termin-item,
    .next-termine,
    .termine-countdown {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .calendar-header,
    .countdown-header {
        background: #667eea !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }

    .day-termin {
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .calendar-day,
    .termin-item {
        border: 2px solid #333;
    }

    .day-termin {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .calendar-nav,
    .termin-item,
    .loading-spinner,
    .termine-notification {
        transition: none;
        animation: none;
    }
}

