/* Opportunities Page Styles */

/* Opportunity card layout fixes */
.opportunity-card .card-body {
    overflow: hidden;
}

/* Ensure title can wrap naturally */
.opportunity-card p.text-muted {
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.5;
}

/* Button container styling */
.opportunity-card .d-flex.flex-column {
    min-height: 80px; /* Ensure buttons have enough space */
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .opportunity-card .col-lg-2 {
        margin-top: 1rem;
    }
    
    .opportunity-card .d-flex.flex-column {
        flex-direction: row !important;
        gap: 0.5rem;
    }
    
    .opportunity-card .btn-sm {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .opportunity-card .d-flex.flex-column {
        flex-direction: column !important;
    }
}

/* Card hover effects */
.hover-shadow-lg {
    transition: box-shadow 0.15s ease-in-out;
}

.hover-shadow-lg:hover {
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important;
}

.transition-shadow {
    transition: box-shadow 0.15s ease-in-out;
}

/* Badge styling */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Filter section styling */
.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Form controls */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Search input with icon */
.position-relative .form-control {
    padding-left: 2.5rem;
}

/* Opportunity cards */
.opportunity-card {
    transition: all 0.2s ease-in-out;
}

.opportunity-card:hover {
    transform: translateY(-2px);
}

/* Button styling */
.btn-sm {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ms-4 {
        margin-left: 0 !important;
        margin-top: 1rem;
    }
    
    .d-flex.flex-column.gap-2 {
        flex-direction: row !important;
        gap: 0.5rem !important;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .d-flex.align-items-center.gap-3 {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
    
    .badge {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .h2 {
        font-size: 1.5rem;
    }
    
    .h5 {
        font-size: 1rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animation for filtering */
.opportunity-card.filtered-out {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease-in-out;
}

.opportunity-card.filtered-in {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease-in-out;
}

/* Empty state styling */
#noResults {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#noResults i {
    opacity: 0.5;
}

/* Status badges */
.badge.bg-primary {
    background-color: #0d6efd !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

.badge.bg-success {
    background-color: #198754 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

/* Custom scrollbar for long lists */
.opportunities-container {
    max-height: 70vh;
    overflow-y: auto;
}

.opportunities-container::-webkit-scrollbar {
    width: 6px;
}

.opportunities-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.opportunities-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.opportunities-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Advanced filters styling */
.form-check-sm .form-check-input {
    margin-top: 0.125rem;
}

.form-check-sm .form-check-label {
    font-size: 0.875rem;
    line-height: 1.25;
}

/* Filter actions */
.btn-sm {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Date input styling */
.form-control[type="date"] {
    padding: 0.375rem 0.75rem;
}

/* Responsive filter layout */
@media (max-width: 992px) {
    .row.g-3 > div {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .d-flex.gap-2 {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .btn-sm {
        width: 100%;
    }
}

/* Pagination styling */
.pagination-info {
    font-size: 0.875rem;
    color: #6c757d;
}

.pagination-controls .pagination {
    margin: 0;
}

.pagination-controls .page-link {
    color: #0d6efd;
    border: 1px solid #dee2e6;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.pagination-controls .page-link:hover {
    color: #0a58ca;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination-controls .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.pagination-controls .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.pagination-size .form-select-sm {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pagination-controls {
        order: 1;
    }
    
    .pagination-info {
        order: 2;
        text-align: center;
    }
    
    .pagination-size {
        order: 3;
        text-align: center;
    }
    
    .pagination-controls .pagination {
        justify-content: center;
    }
}

/* Modal styles moved to OpportunityModal.css - shared between Opportunities and Categories pages */

/* Collapsed Card Styles */
.collapsed-card {
    transition: all 0.3s ease;
}

.collapsed-card-header {
    transition: background-color 0.2s ease;
    border-radius: 8px 8px 0 0;
}

.collapsed-card-header:hover {
    background-color: #e9ecef !important;
}

.expand-icon {
    transition: transform 0.3s ease;
    color: #6c757d;
}

.collapsed-content {
    border-top: 1px solid #dee2e6;
    background-color: #fff;
}

.collapsed-card .card {
    border-radius: 8px;
    overflow: hidden;
}

.collapsed-card .card-header {
    padding: 1rem 1.25rem;
}

.collapsed-card .card-body {
    padding: 1.25rem;
}
