/* ============================================================
   prodregistry-list component styles
   ============================================================ */

/* ---- Wrapper: BREAK OUT of any parent width constraints ---- */
.prodregistry-wrapper {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    margin-left: -50vw !important;
    padding: 0 25px !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    color: #333;
    max-width: none !important;
    min-width: 0 !important;
    overflow: visible !important;
}

/* ---- Search bar (now in filters row) ---- */
.prodregistry-search {
    margin-bottom: 12px;
}
.prodregistry-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.prodregistry-input {
    flex: 1 1 280px;
    min-width: 180px;
    padding: 10px 16px;
    border: 1px solid #b8c0cc;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.prodregistry-input:focus {
    border-color: #2b59a3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(43, 89, 163, 0.15);
}
.prodregistry-filter-val-input {
    flex: 1 1 180px;
    min-width: 120px;
    max-width: 300px;
}

/* ---- Buttons ---- */
.prodregistry-btn {
    display: inline-block;
    padding: 10px 24px;
    border: 1px solid #b8c0cc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s, border-color 0.15s;
    box-sizing: border-box;
}
.prodregistry-btn:hover {
    background: #f0f3f7;
    border-color: #8e99a9;
}
.prodregistry-btn:active {
    background: #e4e9f0;
}
.prodregistry-btn:disabled,
.prodregistry-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    background: #f0f0f0;
    color: #999;
}
.prodregistry-btn-primary {
    background: #2b59a3;
    border-color: #2b59a3;
    color: #fff;
}
.prodregistry-btn-primary:hover {
    background: #234c8e;
    border-color: #1e3f76;
    color: #fff;
}

/* ---- Filters row ---- */
.prodregistry-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px 18px;
    background: #f7f9fc;
    border: 1px solid #dde2e9;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}
.prodregistry-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    flex: 1 1 auto;
}
.prodregistry-filter-group label {
    font-size: 16px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}
.prodregistry-right-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.prodregistry-page-size-group {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}
.prodregistry-page-size-group label {
    font-size: 16px;
    font-weight: 600;
    color: #555;
}

.prodregistry-select {
    padding: 10px 14px;
    border: 1px solid #b8c0cc;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
    background: #fff;
    cursor: pointer;
    box-sizing: border-box;
}
.prodregistry-select:focus {
    border-color: #2b59a3;
    outline: none;
}

/* ---- Total count ---- */
.prodregistry-total {
    font-size: 16px;
    color: #555;
    white-space: nowrap;
}
.prodregistry-total strong {
    color: #2b59a3;
    font-size: 17px;
}

/* ---- Top synced scrollbar ---- */
.prodregistry-scroll-top {
    width: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
    height: 14px;
    margin-bottom: 0;
    box-sizing: border-box;
}
.prodregistry-scroll-top::-webkit-scrollbar {
    height: 14px;
}
.prodregistry-scroll-top::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 4px;
}
.prodregistry-scroll-top::-webkit-scrollbar-thumb {
    background: #b8c0cc;
    border-radius: 4px;
    border: 2px solid #f0f2f5;
}
.prodregistry-scroll-top::-webkit-scrollbar-thumb:hover {
    background: #8e99a9;
}
.prodregistry-scroll-top::-webkit-scrollbar-corner {
    background: transparent;
}
.prodregistry-scroll-top-inner {
    height: 1px;
    width: 100%;
}

/* ---- Table container ---- */
.prodregistry-table-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    border: 1px solid #dde2e9;
    border-top: none;
    border-radius: 0 0 4px 4px;
    margin-bottom: 12px;
    background: #fff;
    box-sizing: border-box;
}
.prodregistry-table-container::-webkit-scrollbar {
    height: 14px;
}
.prodregistry-table-container::-webkit-scrollbar-track {
    background: #f0f2f5;
}
.prodregistry-table-container::-webkit-scrollbar-thumb {
    background: #b8c0cc;
    border-radius: 4px;
    border: 2px solid #f0f2f5;
}
.prodregistry-table-container::-webkit-scrollbar-thumb:hover {
    background: #8e99a9;
}

/* ---- Table ---- */
.prodregistry-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 15px;
    box-sizing: border-box;
}

/* Header */
.prodregistry-th {
    background: #eef1f6;
    border-bottom: 2px solid #c4ccd8;
    border-right: 1px solid #dde2e9;
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 17px;
    color: #333;
    white-space: normal;
    text-overflow: ellipsis;
    position: relative;
    user-select: none;
    box-sizing: border-box;
    vertical-align: top;
    word-wrap: break-word;
}
.prodregistry-th:last-child {
    border-right: none;
}

.prodregistry-sort-icon {
    margin-left: 4px;
    font-size: 13px;
    color: #6b7a8d;
    vertical-align: middle;
}
.prodregistry-sortable {
    cursor: pointer;
}
.prodregistry-sortable:hover {
    background: #dfe5ee;
}

/* ---- Column resize handle ---- */
.prodregistry-resize-handle {
    position: absolute;
    top: 0;
    right: -2px;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    z-index: 2;
    background: transparent;
    transition: background 0.15s;
}
.prodregistry-resize-handle:hover,
.prodregistry-resize-handle:active {
    background: #2b59a3;
}

/* Body */
.prodregistry-cell {
    padding: 10px 14px;
    border-bottom: 1px solid #eaeef3;
    border-right: 1px solid #f0f2f5;
    color: #333;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}
.prodregistry-cell:last-child {
    border-right: none;
}
.prodregistry-cell-name {
    font-weight: 500;
}

.prodregistry-table tbody tr:hover {
    background: #f5f8fc;
}

.prodregistry-empty {
    text-align: center;
    padding: 30px 12px;
    color: #999;
    font-style: italic;
}

/* ---- Pagination ---- */
.prodregistry-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    margin-bottom: 12px;
}
.prodregistry-page-btn {
    padding: 7px 14px;
    font-size: 15px;
    min-width: 40px;
    text-align: center;
}
.prodregistry-page-active {
    background: #2b59a3;
    border-color: #2b59a3;
    color: #fff;
    font-weight: 600;
}
.prodregistry-page-active:hover {
    background: #234c8e;
    border-color: #1e3f76;
    color: #fff;
}
.prodregistry-page-dots {
    padding: 0 6px;
    color: #999;
    font-size: 15px;
}
.prodregistry-nav-btn {
    padding: 7px 16px;
    font-size: 15px;
    margin-left: 8px;
}

/* ---- Loading overlay ---- */
.prodregistry-loading {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: #2b59a3;
    flex-direction: column;
    gap: 12px;
}
.prodregistry-spinner {
    width: 36px; height: 36px;
    border: 4px solid #dde2e9;
    border-top-color: #2b59a3;
    border-radius: 50%;
    animation: prspin 0.8s linear infinite;
}
@keyframes prspin {
    to { transform: rotate(360deg); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .prodregistry-wrapper {
        padding: 0 10px !important;
    }
    .prodregistry-search-row { flex-direction: column; }
    .prodregistry-input { flex: 1 1 100%; min-width: 0; }
    .prodregistry-filters { flex-direction: column; gap: 10px; }
    .prodregistry-filter-group { flex-direction: column; width: 100%; }
    .prodregistry-right-controls { width: 100%; justify-content: flex-start; }
    .prodregistry-table { font-size: 13px; min-width: 600px; }
    .prodregistry-th, .prodregistry-cell { padding: 6px 8px; }
}
