/* frontend.css - WordPress Plugin Styles (Finale Version) */
.dienstplan-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.dienstplan-card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.dienstplan-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
}

.dienstplan-nav-left {
    display: flex;
    gap: 4px;
}

.dienstplan-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: background-color 0.2s;
    font-family: inherit;
}

.dienstplan-btn-inactive {
    color: #6b7280;
    background: transparent;
}

.dienstplan-btn-inactive:hover {
    background: #f3f4f6;
}

.dienstplan-btn-active-employee {
    background: #dcfce7;
    color: #166534;
    font-weight: 500;
}

.dienstplan-btn-active-admin {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 500;
}

.dienstplan-btn-active-eval {
    background: #f3e8ff;
    color: #7c2d12;
    font-weight: 500;
}

.dienstplan-admin-btn {
    padding: 4px 12px;
    font-size: 12px;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
}

.dienstplan-admin-btn:hover {
    background: #e5e7eb;
}

.dienstplan-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .dienstplan-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.dienstplan-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dienstplan-label {
    font-weight: 500;
    font-size: 14px;
    color: #374151;
}

.dienstplan-input {
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.dienstplan-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dienstplan-textarea {
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    min-height: 96px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.dienstplan-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dienstplan-legend {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 14px;
    padding: 16px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.dienstplan-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.dienstplan-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #d1d5db;
    font-size: 12px;
}

.dienstplan-table th,
.dienstplan-table td {
    border: 1px solid #d1d5db;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}

.dienstplan-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.dienstplan-shift-btn {
    width: 100%;
    height: 32px;
    border-radius: 4px;
    border: none;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.dienstplan-shift-available {
    background: #dcfce7;
    color: #166534;
}

.dienstplan-shift-available:hover {
    background: #bbf7d0;
}

.dienstplan-shift-blocked {
    background: #fca5a5;
    color: #7f1d1d;
}

.dienstplan-shift-none {
    background: #e5e7eb;
    color: #6b7280;
}

.dienstplan-shift-none:hover {
    background: #d1d5db;
}

.dienstplan-shift-preferred {
    background: #22c55e;
    color: white;
}

.dienstplan-shift-preferred:hover {
    background: #16a34a;
}

.dienstplan-shift-ifneeded {
    background: #eab308;
    color: white;
}

.dienstplan-shift-ifneeded:hover {
    background: #d97706;
}

.dienstplan-shift-disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.dienstplan-submit-btn {
    padding: 12px 32px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 24px;
    font-family: inherit;
    transition: background-color 0.2s;
}

.dienstplan-submit-btn:hover {
    background: #16a34a;
}

.dienstplan-confirmation {
    text-align: center;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 40px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.dienstplan-check-icon {
    width: 64px;
    height: 64px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 24px;
}

.dienstplan-confirmation h2 {
    color: #166534;
    margin-bottom: 8px;
}

.dienstplan-confirmation p {
    color: #15803d;
    margin-bottom: 16px;
}

.dienstplan-next-steps {
    background: white;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
    border: 1px solid #e5e7eb;
}

.dienstplan-next-steps h3 {
    margin: 0 0 12px 0;
    color: #374151;
}

.dienstplan-next-steps ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dienstplan-next-steps li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #374151;
}

.dienstplan-hidden {
    display: none !important;
}

.dienstplan-admin-header {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.dienstplan-employee-header {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.dienstplan-eval-header {
    background: #faf5ff;
    border: 1px solid #e9d5ff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dienstplan-container {
        padding: 10px;
    }
    
    .dienstplan-card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .dienstplan-nav {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .dienstplan-nav-left {
        justify-content: center;
    }
    
    .dienstplan-admin-btn {
        align-self: center;
    }
    
    .dienstplan-form-grid {
        grid-template-columns: 1fr;
    }
    
    .dienstplan-legend {
        flex-direction: column;
        gap: 12px;
    }
    
    .dienstplan-table {
        font-size: 10px;
    }
    
    .dienstplan-table th,
    .dienstplan-table td {
        padding: 4px;
    }
    
    .dienstplan-shift-btn {
        height: 28px;
        font-size: 10px;
    }
    
    .dienstplan-confirmation {
        padding: 20px 10px;
    }
    
    .dienstplan-check-icon {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}

/* WordPress Admin Integration */
.dienstplan-pref-preferred {
    color: #46b450;
    font-weight: bold;
}

.dienstplan-pref-ifNeeded {
    color: #ffb900;
    font-weight: bold;
}

/* Loading State */
#dienstplan-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

/* Focus States für Accessibility */
.dienstplan-btn:focus,
.dienstplan-admin-btn:focus,
.dienstplan-shift-btn:focus,
.dienstplan-submit-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .dienstplan-nav,
    .dienstplan-admin-btn,
    .dienstplan-submit-btn {
        display: none;
    }
    
    .dienstplan-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Gleichmäßige Spaltenbreiten für Schicht-Tabelle */
.dienstplan-table {
    table-layout: fixed;
    width: 100%;
}

.dienstplan-table colgroup col:first-child {
    width: 10%;
}

.dienstplan-table colgroup col {
    width: 5%;
}