/* modules/PopupDialogSearch.css - Bootstrap 5.3 Compatible */

/* ===== CUSTOM OVERRIDE UNTUK POPUP DIALOG SEARCH ===== */

/* Popup dialog search wrapper */
.popup-dialog-search {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.popup-dialog-search-input {
    flex: 1;
}

.popup-dialog-search-btn {
    white-space: nowrap;
}

/* Table wrapper */
.popup-dialog-table-wrapper {
    max-height: 400px;
    overflow: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}

/* Empty state */
.popup-dialog-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    color: var(--bs-secondary-color);
}

.popup-dialog-empty i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

/* Footer */
.popup-dialog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bs-border-color);
    flex-wrap: wrap;
}

.popup-dialog-rows {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.popup-dialog-rows-label {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    margin: 0;
}

.popup-dialog-rows-select {
    width: auto !important;
}

.popup-dialog-pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.popup-dialog-total-info {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    min-width: 80px;
    text-align: center;
}
 

/* Pick button */
.popup-dialog-pick-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.625rem;
    border: none;
    border-radius: var(--bs-border-radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    background: var(--bs-success);
    color: #fff;
    width: 32px;
    height: 32px;
}

.popup-dialog-pick-btn:hover {
    background: var(--bs-success-hover, #1e7e34);
}

.popup-dialog-pick-btn i {
    font-size: 0.875rem;
}

/* Loading */
.popup-dialog-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.875rem;
    color: var(--bs-secondary-color);
}

.popup-dialog-spinner {
    width: 1.75rem;
    height: 1.75rem;
    border: 3px solid var(--bs-border-color);
    border-top-color: var(--bs-primary);
    border-radius: 50%;
    animation: popup-spin 0.8s linear infinite;
}

@keyframes popup-spin {
    to { transform: rotate(360deg); }
}

/* Filter panel di dalam popup */
.popup-filter-panel {
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    padding: 0.625rem 0.875rem;
    margin-bottom: 0.75rem;
}

.popup-filter-group {
    flex: 1;
    min-width: 150px;
}

.popup-filter-select,
.popup-filter-input {
    width: 100%;
}

/* Table */
.popup-dialog-table {
    font-size: 0.875rem;
    margin-bottom: 0;
}

.popup-dialog-table thead {
    background: var(--bs-tertiary-bg);
    position: sticky;
    top: 0;
    z-index: 1;
}

.popup-dialog-table th {
    padding: 0.625rem 0.875rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    border-bottom: 2px solid var(--bs-border-color);
}

.popup-dialog-table td {
    padding: 0.5rem 0.875rem;
    border-bottom: 1px solid var(--bs-border-color);
    vertical-align: middle;
}

.popup-dialog-table tbody tr:hover {
    background: var(--bs-tertiary-bg);
}

.popup-dialog-table tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 576px) {
    .popup-dialog-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .popup-dialog-rows,
    .popup-dialog-pagination {
        justify-content: center;
    }
    
    .popup-dialog-table th,
    .popup-dialog-table td {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }
}