/**
 * Manager Mode Styles
 * Styles für Manager-spezifische Funktionen
 */

/* Modal Container Styles */
.modal-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

/* Requirements Section Styles */
.requirements-section {
    margin-top: 1rem;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.qualification-requirement-item {
    background: #f9fafb;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

/* Manager Mode Switch */
.mode-switch-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mode-switch-label {
    font-size: 0.875rem;
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.mode-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.mode-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mode-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 0.3s;
    border-radius: 28px;
}

.mode-switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.mode-switch input:checked + .mode-switch-slider {
    background-color: #fbbf24;
}

.mode-switch input:checked + .mode-switch-slider:before {
    transform: translateX(24px);
}

.mode-switch-slider:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.mode-switch input:checked + .mode-switch-slider:hover {
    background-color: #f59e0b;
}

/* Manager Mode Indicator */
.manager-mode-active {
    position: relative;
}

.manager-mode-active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: inherit;
    z-index: -1;
    opacity: 0.3;
}

/* Event Management Toolbar */
.event-management-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    color: white;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toolbar-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.toolbar-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
}

.toolbar-right {
    display: flex;
    gap: 0.75rem;
}

.btn-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toolbar:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-toolbar-primary {
    background: white;
    color: #667eea;
}

.btn-toolbar-primary:hover {
    background: rgba(255, 255, 255, 0.95);
}

/* Event Status Badges */
.event-status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-status-active {
    background: #10b981;
    color: white;
}

.event-status-inactive {
    background: #ef4444;
    color: white;
}

.event-status-full {
    background: #f59e0b;
    color: white;
}

/* Event Card Actions */
.event-card-actions {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.event-card:hover .event-card-actions {
    opacity: 1;
}

/* Dummy Card für Event-Erstellung */
.event-card-create {
    border: 2px dashed var(--color-border);
    background: var(--color-gray-50);
    transition: all 0.3s;
}

.event-card-create:hover {
    border-color: var(--color-primary);
    background: rgba(30, 64, 175, 0.05);
    transform: translateY(-4px);
}

.event-image-create {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--color-gray-400);
}

.event-card-create:hover .event-image-create {
    color: var(--color-primary);
}

.event-card-create .event-content h3 {
    color: var(--color-gray-700);
}

.event-card-create:hover .event-content h3 {
    color: var(--color-primary);
}

/* Inaktive Events - Grau-Darstellung */
.event-card.event-inactive {
    opacity: 0.7;
}

.event-card.event-inactive .event-content h3,
.event-card.event-inactive .event-meta {
    color: var(--color-gray-500);
}

.event-card.event-inactive:hover {
    opacity: 0.85;
}

.event-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.event-action-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

.event-action-btn.edit {
    background: rgba(59, 130, 246, 0.8);
}

.event-action-btn.edit:hover {
    background: rgba(59, 130, 246, 1);
}

.event-action-btn.delete {
    background: rgba(239, 68, 68, 0.8);
}

.event-action-btn.delete:hover {
    background: rgba(239, 68, 68, 1);
}

/* Event Creation Modal */
.event-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    overflow-y: auto;
    padding: 2rem;
}

.event-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.event-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #111827;
}

.event-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.event-modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.event-modal-body {
    padding: 2rem;
}

.event-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Form Styles für Event Creation */
.form-grid {
    display: grid;
    gap: var(--spacing-5);
}

.form-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.event-modal .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.event-modal .form-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-gray-700);
}

.event-modal .form-input {
    width: 100%;
    padding: var(--spacing-3) var(--spacing-4);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--color-gray-900);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    font-family: inherit;
}

.event-modal .form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.event-modal .form-input::placeholder {
    color: var(--color-gray-400);
}

/* Checkbox im Modal - angepasst an custom-checkboxes.css */
.event-modal .form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    padding: var(--spacing-3);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
    cursor: pointer;
    font-weight: 500;
}

.event-modal .form-group label:has(input[type="checkbox"]):hover {
    background-color: rgba(30, 64, 175, 0.03);
}

.event-modal input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin: 0;
    cursor: pointer;
    position: relative;
    background-color: white;
    border: 2px solid var(--color-gray-300);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.event-modal input[type="checkbox"]:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.event-modal input[type="checkbox"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}

.event-modal input[type="checkbox"]:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.event-modal input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.image-upload-area {
    position: relative;
    width: 100%;
    height: 200px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
}

.image-upload-area:hover {
    border-color: #667eea;
    background: #f3f4f6;
}

.image-upload-area.has-image {
    border-style: solid;
    padding: 0;
}

.image-preview {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.upload-placeholder {
    text-align: center;
    color: #6b7280;
}

.upload-placeholder svg {
    margin-bottom: 0.5rem;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: #9ca3af;
}

.remove-image-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-image-btn:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.05);
}

/* Color Gradient Picker */
.gradient-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.gradient-option {
    aspect-ratio: 1;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
}

.gradient-option:hover {
    transform: scale(1.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.gradient-option.selected {
    border-color: #667eea;
    transform: scale(1.05);
}

/* Shift Management in Detail View */
.shift-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.shift-actions-readonly {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f3f4f6;
    border-radius: 8px;
    color: #6b7280;
    font-size: 0.875rem;
}

.btn-edit-application {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit-application:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-withdraw-application {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-withdraw-application:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Area Card Actions */
.area-card-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.area-card:hover .area-card-actions {
    opacity: 1;
}

.area-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.area-action-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

.area-action-btn.edit {
    background: rgba(59, 130, 246, 0.8);
}

.area-action-btn.edit:hover {
    background: rgba(59, 130, 246, 1);
}

.area-action-btn.delete {
    background: rgba(239, 68, 68, 0.8);
}

.area-action-btn.delete:hover {
    background: rgba(239, 68, 68, 1);
}

/* Dummy Card für Bereich-Erstellung */
.area-card-create {
    border: 2px dashed var(--color-border);
    background: var(--color-gray-50);
    transition: all 0.3s;
}

.area-card-create:hover {
    border-color: var(--color-primary);
    background: rgba(30, 64, 175, 0.05);
    transform: translateY(-4px);
}

.area-icon-create {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--color-gray-400);
    border-radius: 50%;
}

.area-card-create:hover .area-icon-create {
    color: var(--color-primary);
}

.area-card-create .area-content h3 {
    color: var(--color-gray-700);
}

.area-card-create:hover .area-content h3 {
    color: var(--color-primary);
}

/* Inaktive Bereiche - Grau-Darstellung */
.area-card.area-inactive {
    opacity: 0.7;
}

.area-card.area-inactive .area-content h3,
.area-card.area-inactive .area-content p {
    color: var(--color-gray-500);
}

.area-card.area-inactive:hover {
    opacity: 0.85;
}
.area-management-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.area-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.area-management-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #111827;
}

.btn-add-area {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-area:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.area-list {
    display: grid;
    gap: 1rem;
}

.area-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.area-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.area-item-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: #111827;
}

.area-item-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.area-item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
}

.btn-icon:hover {
    background: white;
    border-color: #9ca3af;
    color: #111827;
}

.btn-icon.edit:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #3b82f6;
}

.btn-icon.delete:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

/* Shift List in Area Management */
.shift-list {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.shift-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.shift-list-header h5 {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-add-shift {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-shift:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.shift-items {
    display: grid;
    gap: 0.5rem;
}

.shift-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s;
}

.shift-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.shift-item-info {
    flex: 1;
}

.shift-item-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.25rem;
}

.shift-item-meta {
    font-size: 0.75rem;
    color: #6b7280;
}

.shift-item-actions {
    display: flex;
    gap: 0.375rem;
}

.btn-icon-sm {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    color: #9ca3af;
}

.btn-icon-sm:hover {
    background: #f9fafb;
    color: #374151;
}

/* Shift Detail Actions */
.shift-detail-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.shift-detail-item:hover .shift-detail-actions {
    opacity: 1;
}

.shift-detail-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.shift-detail-action-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

.shift-detail-action-btn.edit {
    background: rgba(59, 130, 246, 0.8);
}

.shift-detail-action-btn.edit:hover {
    background: rgba(59, 130, 246, 1);
}

.shift-detail-action-btn.delete {
    background: rgba(239, 68, 68, 0.8);
}

.shift-detail-action-btn.delete:hover {
    background: rgba(239, 68, 68, 1);
}

/* Dummy Card für Schicht-Erstellung */
.shift-detail-create {
    border: 2px dashed var(--color-border);
    background: var(--color-gray-50);
    cursor: pointer;
    transition: all 0.3s;
    padding: 2rem;
}

.shift-detail-create:hover {
    border-color: var(--color-primary);
    background: rgba(30, 64, 175, 0.05);
    transform: translateY(-2px);
}

.shift-create-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.shift-create-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray-400);
}

.shift-detail-create:hover .shift-create-icon {
    color: var(--color-primary);
}

.shift-create-content h4 {
    margin: 0 0 0.25rem 0;
    color: var(--color-gray-700);
    font-size: 1.125rem;
}

.shift-detail-create:hover .shift-create-content h4 {
    color: var(--color-primary);
}

.shift-create-content .text-muted {
    margin: 0;
}

/* Shift Detail Item im Manager-Modus */
.shift-detail-item.manager-mode-active {
    position: relative;
}

.shift-detail-item.manager-mode-active .shift-actions {
    padding: 1rem;
    background: var(--color-gray-50);
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

/* Manager Mode Hidden Elements */
body:not(.manager-mode) .manager-only {
    display: none !important;
}

body.manager-mode .user-only {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .mode-switch-container {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }

    .event-management-toolbar {
        flex-direction: column;
        gap: 1rem;
    }

    .toolbar-right {
        width: 100%;
        flex-direction: column;
    }

    .btn-toolbar {
        width: 100%;
        justify-content: center;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .gradient-picker {
        grid-template-columns: repeat(3, 1fr);
    }
}
