/* ================================================
   Praxis Dienstplan - CSS
   ================================================ */

.pd-wrap, .pd-frontend-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Tabellen */
.pd-table, .pd-frontend-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.pd-table th, .pd-frontend-table th {
    background: #2c3e50;
    color: #fff;
    padding: 10px 12px;
    text-align: center;
    font-size: 13px;
}

.pd-table td, .pd-frontend-table td {
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    vertical-align: top;
    text-align: center;
}

.pd-table tr:hover td {
    background: #f5f5f5;
}

/* Schicht-Badges */
.pd-badge {
    display: inline-block;
    color: #fff;
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    margin: 2px;
    line-height: 1.4;
    text-align: center;
    min-width: 80px;
}

.pd-badge small {
    font-weight: 400;
    font-size: 11px;
    display: block;
}

.pd-badge a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-left: 4px;
}

.pd-badge a:hover {
    color: #fff;
}

/* Inline-Löschformular (POST statt GET) */
.pd-delete-inline {
    display: inline;
}
.pd-delete-btn-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 1em;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1;
}
.pd-delete-btn-link:hover {
    color: #fff;
}

/* Wochen-/Monats-Navigation */
.pd-week-nav,
.pd-view-nav {
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pd-view-tabs {
    margin-right: 8px;
}

.pd-schedule-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.pd-table-month {
    width: max-content;
    min-width: 100%;
}

.pd-cell-name {
    position: sticky;
    left: 0;
    z-index: 5;
    box-shadow: 2px 0 4px rgba(0,0,0,0.05);
}

.pd-table thead th.pd-cell-name {
    background: #2c3e50 !important;
    color: #fff;
}

.pd-table tbody td.pd-cell-name {
    background: #fff !important;
}

.pd-cell-month {
    min-width: 70px;
}

.pd-btn {
    background: #2c3e50;
    color: #fff !important;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
}

.pd-btn:hover {
    background: #1a252f;
}

/* Zellen */
.pd-cell {
    min-width: 90px;
    vertical-align: top;
}

/* Formular */
.pd-form .form-table td {
    padding: 8px 10px;
}

/* Zeitraum-Label */
.pd-period {
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
}

/* Leerer Zustand */
.pd-empty {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 12px;
    border-radius: 5px;
    color: #856404;
    margin-top: 10px;
}

/* Fehler */
.pd-error {
    background: #f8d7da;
    border: 1px solid #dc3545;
    padding: 10px;
    border-radius: 5px;
    color: #721c24;
}

/* Erster Spalten-Header (Mitarbeiter) linksbündig */
.pd-table th:first-child,
.pd-frontend-table th:first-child {
    text-align: left;
    padding-left: 12px;
}

.pd-table td:first-child,
.pd-frontend-table td:first-child {
    text-align: left;
    font-weight: 600;
    padding-left: 12px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .pd-frontend-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .pd-badge {
        min-width: 60px;
        font-size: 11px;
    }
    .pd-week-nav {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* ================================================
   Schnelleingabe CSS – Ergänzung zu pd-style.css
   ================================================ */

.pd-bulk-header {
    margin: 12px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.pd-bulk-month-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pd-bulk-month-picker {
    margin: 0;
}

.pd-bulk-legend {
    margin: 10px 0 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pd-bulk-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.pd-bulk-table {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
    font-size: 11px;
}

.pd-bulk-header-row th {
    background: #2c3e50 !important;
    color: #fff !important;
    text-align: center;
    padding: 2px 0;
    border: 1px solid #3d5166;
    white-space: nowrap;
}

.pd-bulk-header-row th * {
    color: #fff !important;
}

.pd-bulk-name-col {
    min-width: 100px;
    max-width: 115px;
    text-align: left !important;
    padding-left: 4px !important;
    position: sticky;
    left: 0;
    z-index: 10;
    background: #2c3e50 !important;
    color: #fff !important;
}

.pd-bulk-date-col {
    min-width: 1px;
    color: #fff !important;
}

.pd-bulk-date-col .pd-bulk-dow,
.pd-bulk-date-col .pd-bulk-day {
    color: #fff !important;
}

.pd-bulk-dow {
    font-size: 10px;
    display: block;
    line-height: 1.1;
    color: #fff;
}

.pd-bulk-day {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.pd-bulk-type-row th {
    padding: 1px 0;
    text-align: center;
    border: 1px solid #eee;
    font-size: 10px;
    background: #fff;
}

.pd-bulk-type-col {
    min-width: 12px;
    width: 12px;
    max-width: 12px;
    cursor: pointer;
}

.pd-bulk-count {
    display: block;
    font-size: 9px;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 0;
    line-height: 1;
}

.pd-bulk-name {
    font-weight: 600;
    font-size: 10px;
    white-space: nowrap;
    padding: 2px 4px;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
    position: sticky;
    left: 0;
    z-index: 5;
    min-width: 100px;
    max-width: 115px;
    cursor: pointer;
    line-height: 1.15;
}

.pd-bulk-cell {
    text-align: center;
    padding: 0;
    border: 1px solid #e5e5e5;
    width: 12px;
    min-width: 12px;
    max-width: 12px;
}

.pd-bulk-cell input[type="checkbox"] {
    width: 10px;
    height: 10px;
    min-width: 10px;
    min-height: 10px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    accent-color: #2c3e50;
    vertical-align: middle;
}

.pd-bulk-cell:hover {
    background: #e8f4fd;
}

tbody tr:nth-child(even) .pd-bulk-name {
    background: #f0f0f0;
}

tbody tr:nth-child(even) .pd-bulk-cell {
    background: #fafafa;
}

tbody tr:hover .pd-bulk-cell {
    background: #e8f4fd !important;
}

tbody tr:hover .pd-bulk-name {
    background: #d6eaf8 !important;
}

.pd-bulk-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Plan versenden */
.pd-recipients-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-top: 8px;
}

.pd-recipients-list label {
    display: block;
    padding: 4px 0;
    cursor: pointer;
}

.pd-recipients-list label[disabled] {
    color: #999;
    cursor: not-allowed;
}

.pd-send-form .form-table th {
    width: 180px;
    vertical-align: top;
    padding-top: 16px;
}

/* Frontend Planung – Tabs */
.pd-planung-tabs {
    display: flex;
    gap: 8px;
    margin: 14px 0;
}

.pd-tab {
    padding: 8px 16px;
    background: #e8ecf0;
    color: #444;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: .9rem;
}

.pd-tab:hover {
    background: #d6dce4;
}

.pd-tab-active {
    background: #2980b9 !important;
    color: #fff !important;
}

.pd-planung-msg {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
}

.pd-msg-success {
    background: #eafaf1;
    border: 1px solid #27ae60;
    color: #1e8449;
}

.pd-bulk-overwrite {
    display: block;
    margin: 10px 0;
}

/* Tagesweise Spaltentrennung – Schnelleingabe */
.pd-bulk-days-sep .pd-bulk-date-col {
    border-left: 2px solid #2c3e50 !important;
}

.pd-bulk-days-sep .pd-bulk-type-col.pd-day-first,
.pd-bulk-days-sep .pd-bulk-cell.pd-day-first {
    border-left: 2px solid #2c3e50 !important;
}

/* Tagesweise Spaltentrennung – Einzeln-Ansicht */
.pd-planung-days-sep th:not(:first-child),
.pd-planung-days-sep td:not(:first-child) {
    border-left: 2px solid #d0d7de !important;
}

/* Frontend Planung – bearbeitbarer Dienstplan */
.pd-planung-hint {
    font-size: .85rem;
    color: #666;
    margin: 8px 0 12px;
}

.pd-planung-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 2px dashed #ccc;
    background: #fafafa;
    color: #999;
    font-size: 18px;
    line-height: 1;
    border-radius: 6px;
    cursor: pointer;
    transition: all .2s;
}

.pd-planung-add:hover {
    border-color: #3498db;
    color: #3498db;
    background: #f0f9ff;
}

.pd-planung-badge {
    position: relative;
}

.pd-planung-del {
    position: absolute;
    top: 2px;
    right: 4px;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    background: rgba(0,0,0,.2);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s;
}

.pd-planung-badge:hover .pd-planung-del {
    opacity: 1;
}

.pd-planung-del:hover {
    background: rgba(231,76,60,.9);
}

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

.pd-modal-inner {
    background: #fff;
    padding: 20px 24px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    min-width: 280px;
}

.pd-modal-inner h4 {
    margin: 0 0 16px;
    font-size: 1rem;
}

.pd-modal-inner label {
    display: block;
    margin-bottom: 12px;
}

.pd-modal-inner select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: .95rem;
}

.pd-modal-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
}

.pd-modal-actions .pd-btn {
    padding: 8px 16px;
}

.pd-modal-cancel {
    background: #e0e0e0;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: .9rem;
}

.pd-modal-cancel:hover {
    background: #d0d0d0;
}

/* ================================================
   Dienstplan-Übersicht (Woche/Monat, PDF-fähig)
   ================================================ */
.pd-uebersicht-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 100%;
}

.pd-uebersicht-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.pd-uebersicht-tabs {
    display: flex;
    gap: 8px;
    margin-right: 12px;
}

.pd-uebersicht-pdf {
    margin-left: auto;
}

.pd-btn-pdf {
    background: #27ae60 !important;
}

.pd-btn-pdf:hover {
    background: #219a52 !important;
}

.pd-uebersicht-title {
    margin-bottom: 12px;
}

.pd-uebersicht-title h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1a3a5c;
}

.pd-uebersicht-table-wrap {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 16px;
}

.pd-uebersicht-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pd-uebersicht-table th {
    background: #2c3e50;
    color: #fff;
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #3d5166;
}

.pd-uebersicht-table td {
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    vertical-align: top;
    text-align: center;
}

.pd-ueb-name {
    min-width: 140px;
    text-align: left !important;
    font-weight: 600;
    background: #f8f9fa !important;
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 2px 0 4px rgba(0,0,0,.05);
}

.pd-uebersicht-table thead th.pd-ueb-name {
    background: #2c3e50 !important;
    color: #fff;
}

.pd-uebersicht-table tbody td.pd-ueb-name {
    background: #f8f9fa !important;
}

.pd-ueb-badge {
    display: inline-block;
    margin: 3px;
    min-width: 72px;
}

.pd-ueb-kw {
    font-size: 11px;
    opacity: 0.9;
}

.pd-week-sep {
    border-left: 2px solid #2c3e50 !important;
}

.pd-uebersicht-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
    font-size: 12px;
}

/* Wochen-/Monats-Trennung in Schnelleingabe Monatsansicht */
.pd-bulk-week-sep .pd-bulk-date-col.pd-week-first,
.pd-bulk-week-sep .pd-bulk-type-col.pd-week-first,
.pd-bulk-week-sep .pd-bulk-cell.pd-week-first {
    border-left: 2px solid #5a7a9a !important;
}

/* Kompakte Schnelleingabe – Woche auf einen Blick */
.pd-bulk-readable .pd-bulk-cell {
    padding: 0;
    min-width: 12px;
    max-width: 12px;
}

.pd-bulk-readable .pd-bulk-cell input[type="checkbox"] {
    width: 10px;
    height: 10px;
    cursor: pointer;
}

.pd-bulk-legend .pd-badge small {
    display: inline;
    margin-left: 4px;
    opacity: 0.9;
}

.pd-planung-view-tabs {
    margin-bottom: 12px;
}

/* Druck / PDF */
@media print {
    .pd-no-print {
        display: none !important;
    }
    .pd-uebersicht-wrap {
        padding: 0;
    }
    .pd-uebersicht-title {
        margin-bottom: 8px;
    }
    .pd-uebersicht-title h3 {
        font-size: 1.1rem;
    }
    .pd-uebersicht-table {
        font-size: 11px;
    }
    .pd-uebersicht-table th,
    .pd-uebersicht-table td {
        padding: 6px 8px;
    }
    .pd-ueb-badge {
        font-size: 10px;
        padding: 2px 6px;
        min-width: 56px;
    }
}
