/**
 * Modal Styles für Neue Nachricht
 * 
 * @package IT_Expert_Messages
 * @since 1.0.0
 */

/* Modal Overlay */
.dash-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.dash-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.dash-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dash-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #23282d;
}

.dash-modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #666;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-modal-close:hover {
    background: #f5f5f5;
    color: #dc3232;
}

/* Modal Body */
.dash-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Form Group */
.dash-form-group {
    margin-bottom: 1.5rem;
}

.dash-form-group:last-child {
    margin-bottom: 0;
}

.dash-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #23282d;
    font-size: 0.9rem;
}

/* Search Input Wrapper */
.dash-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.dash-search-input-wrapper svg {
    position: absolute;
    left: 12px;
    color: #666;
    pointer-events: none;
}

.dash-search-input-wrapper input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.dash-search-input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Search Results */
.dash-search-results {
    margin-top: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
}

.dash-search-results:empty {
    display: none;
}

.dash-search-result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.dash-search-result-item:last-child {
    border-bottom: none;
}

.dash-search-result-item:hover {
    background: #f9f9f9;
}

.dash-search-result-item.selected {
    background: #e8f0fe;
    border-left: 3px solid #667eea;
}

.dash-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.75rem;
    object-fit: cover;
}

.dash-user-info {
    flex: 1;
}

.dash-user-name {
    font-weight: 600;
    color: #23282d;
    margin-bottom: 0.25rem;
}

.dash-user-email {
    font-size: 0.85rem;
    color: #666;
}

.dash-search-no-results,
.dash-search-error {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.dash-search-error {
    color: #dc3232;
}

/* Textarea */
.dash-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s;
}

.dash-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Modal Footer */
.dash-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.dash-modal-footer .dash-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 600px) {
    .dash-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .dash-modal-header,
    .dash-modal-body,
    .dash-modal-footer {
        padding: 1rem;
    }
    
    .dash-modal-footer {
        flex-direction: column;
    }
    
    .dash-modal-footer .dash-btn {
        width: 100%;
    }
}
