/**
 * Termin-Picker Styles
 * 
 * @package BurwitzIT\FormularTermin
 */

/* ===== Termin-Feld im Formular ===== */
.burwitz-ft-termin-field {
    margin-bottom: 20px;
}

.burwitz-ft-termin-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.burwitz-ft-termin-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.burwitz-ft-termin-btn .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.burwitz-ft-termin-selected {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #d7f7e3;
    border: 1px solid #46b450;
    border-radius: 4px;
    color: #1e7e34;
}

.burwitz-ft-termin-selected .dashicons {
    color: #46b450;
}

.burwitz-ft-termin-selected-text {
    font-weight: 500;
}

.burwitz-ft-termin-clear {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #dc3232;
    margin-left: 8px;
    border-radius: 3px;
    transition: background 0.2s;
}

.burwitz-ft-termin-clear:hover {
    background: rgba(220, 50, 50, 0.1);
}

.burwitz-ft-termin-clear .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* ===== Modal ===== */
.burwitz-termin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
}

.burwitz-termin-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.burwitz-termin-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.burwitz-termin-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.burwitz-termin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #dcdcde;
}

.burwitz-termin-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #1d2327;
}

.burwitz-termin-modal-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #646970;
    border-radius: 3px;
    transition: all 0.2s;
}

.burwitz-termin-modal-close:hover {
    background: #f0f0f1;
    color: #1d2327;
}

.burwitz-termin-modal-close .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

.burwitz-termin-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* ===== Loading State ===== */
.burwitz-termin-loading {
    text-align: center;
    padding: 40px 20px;
    color: #646970;
}

.burwitz-termin-loading .burwitz-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f1;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

/* ===== Empty State ===== */
.burwitz-termin-empty {
    text-align: center;
    padding: 40px 20px;
    color: #646970;
}

.burwitz-termin-empty .dashicons {
    width: 60px;
    height: 60px;
    font-size: 60px;
    color: #c3c4c7;
    margin-bottom: 16px;
}

.burwitz-termin-empty p {
    margin: 8px 0;
}

.burwitz-termin-empty .help-text {
    font-size: 14px;
    color: #787c82;
}

/* ===== Termin-Liste ===== */
.burwitz-termin-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.burwitz-termin-group {
    background: #f6f7f7;
    padding: 16px;
    border-radius: 6px;
}

.burwitz-termin-date {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    padding-bottom: 8px;
    border-bottom: 2px solid #0073aa;
}

.burwitz-termin-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.burwitz-termin-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid #dcdcde;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
    cursor: pointer;
    transition: all 0.2s ease;
}

.burwitz-termin-slot:hover {
    border-color: #0073aa;
    background: #f0f6fc;
    color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.15);
}

.burwitz-termin-slot .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* ===== Body Lock beim Modal ===== */
body.burwitz-modal-open {
    overflow: hidden;
}

/* ===== Animationen ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .burwitz-termin-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .burwitz-termin-slots {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .burwitz-termin-slot {
        padding: 10px 12px;
        font-size: 13px;
    }
}
