/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Document Selector Widget */
.aiedocs-selector-widget {
    display: inline-block;
    margin: 10px 0;
}

.aiedocs-selector-button {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.aiedocs-selector-button:hover {
    background: #e8e8e8;
    border-color: #999;
}

.aiedocs-selector-icon {
    font-size: 16px;
}

.aiedocs-selector-text {
    color: #333;
}

/* Modal Overlay */
.aiedocs-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

/* Modal Container */
.aiedocs-selector-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 70vh;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.aiedocs-modal-content {
    padding: 20px;
}

.aiedocs-modal-content h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

/* Documents List */
.aiedocs-documents-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
}

.aiedocs-document-item {
    display: block;
    padding: 8px;
    margin-bottom: 5px;
    background: #f9f9f9;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.aiedocs-document-item:hover {
    background: #f0f0f0;
}

.aiedocs-document-item input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}

.aiedocs-document-title {
    font-weight: 500;
    color: #333;
}

.aiedocs-document-type {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 6px;
    background: #e0e0e0;
    border-radius: 3px;
    font-size: 12px;
    color: #666;
}

/* Modal Actions */
.aiedocs-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.aiedocs-modal-actions button {
    padding: 8px 16px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.aiedocs-modal-actions button:hover {
    background: #f0f0f0;
}

.aiedocs-modal-close {
    background: #007cba !important;
    color: white !important;
    border-color: #007cba !important;
}

.aiedocs-modal-close:hover {
    background: #005a87 !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .aiedocs-selector-modal {
        width: 95%;
        max-height: 80vh;
    }
    
    .aiedocs-documents-list {
        max-height: 300px;
    }
    
    .aiedocs-modal-actions {
        flex-direction: column;
    }
    
    .aiedocs-modal-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .aiedocs-selector-button {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .aiedocs-selector-icon {
        font-size: 14px;
    }
    
    .aiedocs-modal-content h3 {
        font-size: 16px;
    }
    
    .aiedocs-document-type {
        display: block;
        margin-left: 0;
        margin-top: 5px;
    }
}