/* EBDO Plugin Styles */

.ebdo-search-wrapper {
    max-width: 800px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ebdo-search-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ebdo-search-form input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 15px;
}

.ebdo-search-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ebdo-search-controls select,
.ebdo-search-controls button {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.ebdo-search-controls button {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.ebdo-search-controls button:hover {
    background: #005a87;
}

.ebdo-results-container {
    min-height: 200px;
}

.ebdo-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.ebdo-results-summary {
    background: #e7f3ff;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    color: #0073aa;
}

.ebdo-result-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ebdo-result-item h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.ebdo-result-item p {
    margin: 5px 0;
    line-height: 1.5;
}

.ebdo-result-item strong {
    color: #0073aa;
}

/* Type-specific styling */
.ebdo-donation {
    border-left: 4px solid #28a745;
}

.ebdo-book {
    border-left: 4px solid #dc3545;
}

.ebdo-person {
    border-left: 4px solid #ffc107;
}

/* Pagination */
.ebdo-pagination {
    text-align: center;
    margin-top: 20px;
}

.ebdo-page-btn {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.ebdo-page-btn:hover {
    background: #f8f9fa;
}

.ebdo-page-btn.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Statistics */
.ebdo-statistics {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.ebdo-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.ebdo-stat-item {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ebdo-stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 5px;
}

.ebdo-stat-label {
    color: #666;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

/* List displays */
.ebdo-donations-list,
.ebdo-books-list,
.ebdo-people-list {
    margin: 20px 0;
}

.ebdo-donation-item,
.ebdo-book-item,
.ebdo-person-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.ebdo-donation-item h4,
.ebdo-book-item h4,
.ebdo-person-item h4 {
    margin: 0 0 10px 0;
    color: #333;
}

/* Responsive design */
@media (max-width: 768px) {
    .ebdo-search-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ebdo-search-controls select,
    .ebdo-search-controls button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .ebdo-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.ebdo-modal {
    display: block;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background: rgba(0,0,0,0.5);
}
.ebdo-modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 30px 20px 20px 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.ebdo-modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2em;
    color: #888;
    cursor: pointer;
    font-weight: bold;
    z-index: 10001;
}
.ebdo-modal-close:hover {
    color: #0073aa;
}
.ebdo-modal-body {
    margin-top: 10px;
}