/**
 * Vermittler Management Styles
 * Enhanced styling for vermittler management modal
 */

/* Modal base styles */
#vermittlerManagementModal {
    z-index: 10001;
}

#vermittlerManagementModal .portal-modal-content.extra-large {
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Vermittler Selection Section */
.vermittler-selection-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e2e4e9;
}

.vermittler-selection-section .form-group {
    margin-bottom: 0;
}

.vermittler-selection-section label {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: block;
}

.vermittler-selection-section select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e4e9;
    border-radius: 8px;
    font-size: 15px;
    background: #ffffff;
    color: #374151;
    transition: all 0.3s ease;
}

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

/* Vermittler Edit Section */
.vermittler-edit-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e4e9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.selected-vermittler-info {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e4e9;
}

.selected-vermittler-info h4 {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-vermittler-info h4::before {
    content: "✏️";
    font-size: 16px;
}

/* Form section styling improvements */
.form-group {
    margin-bottom: 20px;
}

/* Form styling */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e4e9;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Custom provision group */
#customProvisionGroup {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e4e9;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #e2e4e9;
}

.form-actions .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.form-actions .btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

.form-actions .btn-secondary {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.form-actions .btn-secondary:hover {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

/* Conditions tab styling */
.conditions-info h4 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e4e9;
}

/* Loading and error states */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #64748b;
    font-size: 14px;
}

.loading-state::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e2e4e9;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    margin-right: 12px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    font-size: 14px;
    text-align: center;
}

.no-projects {
    padding: 40px;
    text-align: center;
    color: #64748b;
}

/* Enhanced notifications */
.portal-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10002;
    min-width: 300px;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.portal-notification.show {
    transform: translateX(0);
}

.portal-notification.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.portal-notification.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.portal-notification.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
}

.notification-message {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.notification-close:hover {
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    #vermittlerManagementModal .portal-modal-content.extra-large {
        width: 95%;
        margin: 20px auto;
        max-height: calc(100vh - 40px);
    }

    .vermittler-selection-section,
    .vermittler-edit-section {
        padding: 16px;
        margin-bottom: 16px;
    }

    .selected-vermittler-info h4 {
        font-size: 16px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 14px;
    }

    .form-actions {
        flex-direction: column;
        gap: 8px;
    }

    .form-actions .btn {
        width: 100%;
    }

    .portal-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .vermittler-selection-section,
    .vermittler-edit-section {
        padding: 12px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .form-actions .btn {
        padding: 12px 16px;
        font-size: 13px;
    }

    .selected-vermittler-info h4 {
        font-size: 15px;
    }
}

/* Focus management for accessibility */
.portal-modal:focus-within .portal-modal-content {
    outline: none;
}

.tab-button:focus,
.btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .vermittler-item {
        border-bottom-color: #000000;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        border-color: #000000;
    }
} 