/**
 * SanLog - Inline Components CSS
 * 
 * Ausgelagert aus index.html (v3.24.19)
 * Enthält Styles für kleinere UI-Komponenten die vorher
 * inline in index.html waren.
 * 
 * Komponenten:
 * - Ressourcen-Checkboxen
 * - Counter-Buttons
 * - Abschnitt-Filter
 * - Patient-Filter-Tabs
 * - Posten & Ärzte Karten
 * - Floorplan Corner Handles
 */

/* ============================================================================
   RESSOURCEN-CHECKBOXEN (Eingabemaske)
   ============================================================================ */

.ressourcen-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ressourcen-checkboxes .form-group {
    margin-bottom: 0;
}

.ressourcen-checkboxes label {
    font-size: 13px;
    margin-bottom: 4px;
}

.checkbox-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    background: transparent;
    border: none;
}

.checkbox-container:empty::after {
    content: "Keine verfügbar";
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
}

.ressource-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    background: var(--bg-input);
    border: 1px solid var(--gray-300);
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

.ressource-checkbox:hover {
    border-color: var(--success);
}

.ressource-checkbox.checked {
    background: var(--success-light);
    border-color: var(--success);
    color: var(--success);
    font-weight: 500;
}

.ressource-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--success);
}

/* Dark Mode - Checkboxen */
[data-theme="dark"] .checkbox-container {
    background: var(--gray-800);
    border-color: var(--gray-700);
}

[data-theme="dark"] .ressource-checkbox {
    background: var(--gray-700);
    border-color: var(--gray-600);
    color: var(--text-primary);
}

[data-theme="dark"] .ressource-checkbox:hover {
    background: var(--gray-600);
}

[data-theme="dark"] .ressource-checkbox.checked {
    background: rgba(40, 167, 69, 0.2);
    border-color: var(--success);
    color: var(--success);
}

/* ============================================================================
   COUNTER-BUTTONS
   ============================================================================ */

/* Grüne Counter-Buttons für Patienten */
.btn-counter {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: var(--success);
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-counter:hover {
    background: #1e7e34;
    transform: scale(1.1);
}

.btn-counter:active {
    transform: scale(0.95);
}

/* Grüne inline Counter-Buttons für Führungskräfte */
.btn-counter-inline-green {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: var(--success);
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
    transition: all 0.15s ease;
}

.btn-counter-inline-green:hover {
    background: #1e7e34;
    transform: scale(1.1);
}

.counter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.counter-value {
    font-size: 1.2rem;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

/* Button für ambulante Patienten */
.btn-info {
    background: var(--secondary-blue);
    color: white;
    border: none;
}

.btn-info:hover {
    background: #0056b3;
}

/* Großer Patientenkontakte-Zähler */
.patient-stat.kontakte {
    background: linear-gradient(135deg, var(--primary-red) 0%, #b30004 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    min-width: 140px;
}

.patient-stat.kontakte .stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.patient-stat.kontakte .stat-value.large {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1.1;
}

/* ============================================================================
   ABSCHNITT-FILTER
   ============================================================================ */

.abschnitt-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #004A99 0%, #0066cc 100%);
    border-radius: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0,74,153,0.3);
}

.abschnitt-filter-bar .filter-label {
    color: white;
    font-weight: 600;
    font-size: 14px;
    margin-right: 8px;
}

.abschnitt-filter-bar .abschnitt-btn {
    padding: 8px 16px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 8px;
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.abschnitt-filter-bar .abschnitt-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: white;
}

.abschnitt-filter-bar .abschnitt-btn.active {
    background: white;
    color: #004A99;
    border-color: white;
    font-weight: 700;
}

.abschnitt-filter-bar .abschnitt-btn .count {
    margin-left: 4px;
    padding: 2px 6px;
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    font-size: 12px;
}

.abschnitt-filter-bar .abschnitt-btn.active .count {
    background: #004A99;
    color: white;
}

/* ============================================================================
   PATIENT-FILTER-TABS
   ============================================================================ */

.patient-filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 0;
    margin-bottom: 12px;
}

.patient-filter-tab {
    padding: 10px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-theme="dark"] .patient-filter-tab {
    background: #2a2a3e;
    border-color: #444;
    color: #ccc;
}

.patient-filter-tab:hover {
    border-color: #aaa;
    background: #f8f8f8;
}

[data-theme="dark"] .patient-filter-tab:hover {
    background: #3a3a4e;
}

.patient-filter-tab.active {
    background: #333;
    color: white;
    border-color: #333;
}

/* Spezielle Tab-Farben */
.patient-filter-tab.filter-zulauf { 
    border-color: #ff9800; 
    color: #e65100; 
}

.patient-filter-tab.filter-zulauf.active { 
    background: #ff9800; 
    border-color: #ff9800; 
    color: white; 
}

.patient-filter-tab.filter-ambulant { 
    border-color: #607d8b; 
    color: #455a64; 
}

.patient-filter-tab.filter-ambulant.active { 
    background: #607d8b; 
    border-color: #607d8b; 
    color: white; 
}

.patient-filter-tab.filter-entlassen { 
    border-color: #4caf50; 
    color: #2e7d32; 
}

.patient-filter-tab.filter-entlassen.active { 
    background: #4caf50; 
    border-color: #4caf50; 
    color: white; 
}

.patient-filter-tab.filter-mc { 
    border-color: #E60005; 
    color: #c00; 
}

.patient-filter-tab.filter-mc.active { 
    background: #E60005; 
    border-color: #E60005; 
    color: white; 
}

[data-theme="dark"] .patient-filter-tab.filter-zulauf,
[data-theme="dark"] .patient-filter-tab.filter-ambulant,
[data-theme="dark"] .patient-filter-tab.filter-entlassen,
[data-theme="dark"] .patient-filter-tab.filter-mc,
[data-theme="dark"] .patient-filter-tab.filter-aktuell {
    background: #2a2a3e;
}

/* ============================================================================
   POSTEN & ÄRZTE KARTEN (v2.5)
   ============================================================================ */

.resource-card.posten {
    border-left: 4px solid #2196f3;
}

.resource-card.arzt {
    border-left: 4px solid #9c27b0;
}

.resource-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

[data-theme="dark"] .resource-info {
    color: #aaa;
}

.btn-ek {
    width: 22px;
    height: 22px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 14px;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .btn-ek {
    background: #2a2a3e;
    border-color: #444;
    color: #ccc;
}

.btn-ek:hover {
    background: #e0e0e0;
}

[data-theme="dark"] .btn-ek:hover {
    background: #3a3a4e;
}

/* ============================================================================
   FLOORPLAN CORNER HANDLES (v3.18.0)
   ============================================================================ */

.floorplan-corner {
    z-index: 1000;
}

.corner-handle {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: 2px solid white;
    border-radius: 50%;
    cursor: move;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.corner-handle:hover {
    background: var(--primary-dark);
    transform: scale(1.2);
}

.corner-sw { cursor: sw-resize; }
.corner-nw { cursor: nw-resize; }
.corner-ne { cursor: ne-resize; }
.corner-se { cursor: se-resize; }
