/* Admin CSS - assets/admin.css - Vollständige Version mit Vollhöhen-Kanban */

/* Form Builder Styles */
#form-builder-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.form-builder-sidebar {
    width: 250px;
    background: #f9f9f9;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.form-builder-sidebar h3 {
    margin-top: 0;
    color: #333;
}

.field-palette {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field-type {
    padding: 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: move;
    transition: all 0.3s ease;
    user-select: none;
}

.field-type:hover {
    background: #f0f0f1;
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.field-type .dashicons {
    margin-right: 8px;
    color: #0073aa;
}

.form-builder-main {
    flex: 1;
}

.form-settings {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
}

.form-settings label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-settings input {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-canvas {
    min-height: 400px;
    background: #fff;
    border: 2px dashed #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}

.form-canvas-placeholder {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 60px 20px;
    border: 2px dashed #ccc;
    border-radius: 10px;
    background: #fafafa;
}

.form-field {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.form-field:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0,115,170,0.1);
}

.field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
    border-radius: 6px 6px 0 0;
}

.field-label {
    font-weight: 600;
    color: #495057;
}

.field-actions {
    display: flex;
    gap: 8px;
}

.field-actions button {
    padding: 4px 8px;
    font-size: 11px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.edit-field {
    background: #0073aa;
    color: white;
}

.edit-field:hover {
    background: #005a87;
}

.delete-field {
    background: #dc3545;
    color: white;
}

.delete-field:hover {
    background: #c82333;
}

.field-preview {
    padding: 15px;
}

.field-preview input,
.field-preview textarea,
.field-preview select {
    width: 100%;
    max-width: 300px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.form-actions {
    text-align: center;
    padding: 20px 0;
}

.form-actions .button {
    margin: 0 10px;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-content.large {
    max-width: 900px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close:hover {
    color: #000;
}

.config-group {
    margin-bottom: 20px;
}

.config-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.config-group input,
.config-group textarea,
.config-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.config-group textarea {
    height: 100px;
    resize: vertical;
}

.modal-actions {
    text-align: right;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.modal-actions .button {
    margin-left: 10px;
}

/* KANBAN BOARD STYLES - VOLLHÖHEN-VERSION */

/* Kanban-spezifische Wrap-Styles für Vollhöhe */
.kanban-page .wrap {
    height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kanban-page .wrap h1 {
    flex-shrink: 0;
    margin-bottom: 10px;
}

.kanban-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    flex-shrink: 0;
}

.kanban-stats {
    font-weight: 600;
    color: #555;
}

.kanban-board {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0;
    background: #f5f5f5;
    border-radius: 8px;
    margin: 0;
    flex: 1;
    height: 100%;
}

.kanban-column {
    min-width: 320px;
    max-width: 350px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: calc(100% - 40px);
}

.kanban-column-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.kanban-column-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.column-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.request-count {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.edit-category, .delete-category {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kanban-column-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* Verbesserte Scrollbar */
.kanban-column-body::-webkit-scrollbar {
    width: 8px;
}

.kanban-column-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.kanban-column-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.kanban-column-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.column-hover {
    background: #e3f2fd !important;
}

.kanban-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    cursor: grab;
    transition: all 0.3s ease;
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    border-radius: 8px 8px 0 0;
}

.card-id {
    font-weight: 700;
    color: #667eea;
    font-size: 14px;
}

.card-date {
    font-size: 12px;
    color: #6c757d;
}

.card-content {
    padding: 16px;
}

.form-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    font-size: 14px;
}

.form-data {
    font-size: 13px;
    line-height: 1.4;
}

.data-row {
    margin-bottom: 10px;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #007cba;
}

.data-row .question {
    color: #2c3e50;
    font-size: 12px;
    margin-bottom: 3px;
}

.data-row .answer {
    color: #34495e;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

.addresses-section {
    margin-top: 12px;
    padding: 12px;
    background: #e8f4fd;
    border-radius: 6px;
    border: 1px solid #bee5eb;
}

.addresses-label {
    margin-bottom: 8px;
    font-size: 12px;
    color: #0c5460;
    font-weight: 600;
}

.address-item {
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255,255,255,0.7);
    border-radius: 4px;
    border-left: 3px solid #17a2b8;
}

.address-item:last-child {
    margin-bottom: 0;
}

.address-label {
    font-size: 11px;
    color: #495057;
    font-weight: 600;
    margin-bottom: 3px;
}

.address-value {
    margin-bottom: 6px;
    font-size: 12px;
    color: #155724;
    font-weight: 500;
}

.google-earth-link {
    color: #0073aa !important;
    text-decoration: none;
    font-size: 11px;
    display: inline-block;
    padding: 4px 8px;
    background: #f0f8ff;
    border-radius: 3px;
    border: 1px solid #b3d9ff;
    transition: all 0.2s ease;
    font-weight: 600;
}

.google-earth-link:hover {
    background: #e6f3ff;
    border-color: #80c5ff;
    text-decoration: none;
    transform: translateY(-1px);
}

.card-footer {
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
    border-radius: 0 0 8px 8px;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.view-details, .delete-request {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.view-details:hover {
    background: #5a6fd8;
}

.delete-request {
    background: #dc3545;
    padding: 6px 8px;
}

.delete-request:hover {
    background: #c82333;
}

.modal-footer {
    background: #f8f9fa;
    margin: 20px -30px -30px -30px;
    padding: 20px 30px;
    border-radius: 0 0 12px 12px;
}

/* Notifications */
.kanban-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    z-index: 10001;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.kanban-notification.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.kanban-notification.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .kanban-board {
        padding: 10px 0;
    }
    
    .kanban-column {
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .kanban-page .wrap {
        height: calc(100vh - 46px);
    }
    
    #form-builder-container {
        flex-direction: column;
    }
    
    .form-builder-sidebar {
        width: 100%;
        order: 2;
    }
    
    .kanban-column {
        min-width: 250px;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
}

@media (max-width: 600px) {
    .kanban-page .wrap {
        height: calc(100vh - 56px);
    }
    
    .kanban-board {
        padding: 10px 0;
    }
    
    .kanban-column {
        min-width: 260px;
        height: calc(100% - 20px);
    }
}

/* Form Field Placeholder */
.form-field-placeholder {
    height: 60px;
    background: #e9ecef;
    border: 2px dashed #adb5bd;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* Drag and Drop States */
.ui-draggable-dragging {
    opacity: 0.8;
    transform: rotate(5deg);
}

.ui-sortable-helper {
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Vollhöhen Kanban Board CSS - In admin.css hinzufügen oder in der PHP-Datei */

/* KRITISCH: WordPress Admin Layout für Kanban überschreiben */
.kanban-page #wpcontent {
    padding-left: 0;
}

.kanban-page #wpbody-content {
    padding-bottom: 0;
}

.kanban-page .wrap {
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: none;
}

.kanban-page .wrap h1 {
    flex-shrink: 0;
    margin: 20px 20px 10px 20px;
    padding: 0;
}

.kanban-page .kanban-controls {
    flex-shrink: 0;
    margin: 0 20px 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

.kanban-page .kanban-board {
    flex: 1;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 20px 20px 20px;
    margin: 0;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
    min-height: 0; /* Wichtig für Flexbox */
}

.kanban-page .kanban-column {
    min-width: 320px;
    max-width: 350px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.kanban-page .kanban-column-header {
    flex-shrink: 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-page .kanban-column-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    min-height: 0; /* Wichtig für Flexbox Scrolling */
}

/* Verbesserte Scrollbar für bessere UX */
.kanban-page .kanban-column-body::-webkit-scrollbar {
    width: 8px;
}

.kanban-page .kanban-column-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.kanban-page .kanban-column-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.kanban-page .kanban-column-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* WordPress Footer verstecken auf Kanban Seite */
.kanban-page #wpfooter {
    display: none;
}

/* Responsive Anpassungen */
@media screen and (max-width: 1200px) {
    .kanban-page .kanban-column {
        min-width: 280px;
        max-width: 320px;
    }
}

@media screen and (max-width: 782px) {
    .kanban-page .wrap {
        height: calc(100vh - 46px); /* WordPress Mobile Header berücksichtigen */
    }
    
    .kanban-page .kanban-board {
        padding: 0 10px 10px 10px;
    }
    
    .kanban-page .kanban-column {
        min-width: 250px;
        max-width: 280px;
    }
}

/* Drag and Drop States */
.kanban-page .column-hover {
    background: #e3f2fd !important;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.kanban-page .kanban-card.ui-draggable-dragging {
    opacity: 0.8;
    transform: rotate(2deg);
    z-index: 1000;
}

/* Loading States */
.kanban-page .kanban-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}