@import '_content/webenology.blazor.components/webenology.blazor.components.bundle.scp.css';

/* _content/BPN.Web/Pages/Manage/HierarchyMargins.razor.rz.scp.css */
/* ============================================
   HIERARCHY MARGINS - SIMPLIFIED CSS
   Fast, Clean, Single-Page CRUD Interface
   ============================================ */

/* ============================================
   BASE LAYOUT
   ============================================ */
.content-wrapper[b-8xxqprg1rg] {
    padding: 1rem;
}

.content-container[b-8xxqprg1rg] {
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   IMPORT OVERLAY
   ============================================ */
.import-overlay[b-8xxqprg1rg] {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.import-overlay-content[b-8xxqprg1rg] {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
}

.import-overlay-content h4[b-8xxqprg1rg] {
    margin: 0;
    color: #333;
    font-weight: 600;
}

.import-overlay-content .progress[b-8xxqprg1rg] {
    margin: 1rem auto;
    border-radius: 4px;
    background: #e9ecef;
}

.import-overlay-content .text-muted[b-8xxqprg1rg] {
    margin-bottom: 0;
    font-size: 14px;
}

.import-spinner[b-8xxqprg1rg] {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================================
   TOOLBAR / FILTER BAR
   ============================================ */
.mobile-header[b-8xxqprg1rg] {
    display: none;
}

.desktop-header[b-8xxqprg1rg] {
    display: block;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.filter-bar[b-8xxqprg1rg] {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 1rem;
    background: #e9ecef;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
}

.filter-left[b-8xxqprg1rg] {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.filter-right[b-8xxqprg1rg] {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ============================================
   SEARCH BOX
   ============================================ */
.search-group[b-8xxqprg1rg] {
    display: flex;
    align-items: center;
    gap: 0;
}

.btn-search[b-8xxqprg1rg] {
    width: 36px;
    height: 36px;
    padding: 0;
    background: #fff;
    border: 1px solid #999;
    border-radius: 4px 0 0 4px;
    color: #555;
    cursor: pointer;
}

.btn-search:hover[b-8xxqprg1rg] {
    background: #f0f0f0;
}

.search-box[b-8xxqprg1rg] {
    position: relative;
    flex: 0 1 200px;
    min-width: 150px;
    max-width: 250px;
}

.search-box .filter-input[b-8xxqprg1rg] {
    border-radius: 4px 0 0 4px;
}

.filter-input[b-8xxqprg1rg] {
    width: 100%;
    height: 36px;
    padding: 6px 32px 6px 10px;
    font-size: 14px;
    border: 1px solid #999;
    border-radius: 4px;
    background: #fff;
}

.filter-input:focus[b-8xxqprg1rg] {
    outline: none;
    border-color: #0d6efd;
}

.btn-icon[b-8xxqprg1rg] {
    position: absolute;
    right: 2px;
    top: 2px;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover[b-8xxqprg1rg] {
    color: #333;
}

.result-count[b-8xxqprg1rg] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    background: #f5f5f5;
    border: 1px solid #999;
    border-left: none;
    border-radius: 0 4px 4px 0;
}

/* ============================================
   FILTER DROPDOWNS
   ============================================ */
.filter-with-icon[b-8xxqprg1rg] {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 6px 0 10px;
    background: #fff;
    border: 1px solid #999;
    border-radius: 4px;
    flex-shrink: 1;
    min-width: 100px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.filter-with-icon:hover[b-8xxqprg1rg] {
    background: #f8f8f8;
    border-color: #000;
}

.filter-with-icon i[b-8xxqprg1rg] {
    color: #666;
    font-size: 13px;
}

.filter-select[b-8xxqprg1rg] {
    height: 34px;
    min-width: 80px;
    max-width: 140px;
    padding: 0 24px 0 4px;
    font-size: 14px;
    color: #333;
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 6px center;
    background-size: 10px;
    border: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.filter-select:focus[b-8xxqprg1rg] {
    outline: none;
}

.filter-with-icon .filter-select[b-8xxqprg1rg] {
    background-color: transparent;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */
.btn-group[b-8xxqprg1rg] {
    display: inline-flex;
}

.btn-group .btn-action:first-child[b-8xxqprg1rg] {
    border-radius: 4px 0 0 4px;
}

.btn-group .btn-action:last-child[b-8xxqprg1rg] {
    border-radius: 0 4px 4px 0;
    margin-left: -1px;
}

.btn-group .btn-action:only-child[b-8xxqprg1rg] {
    border-radius: 4px;
    margin-left: 0;
}

.btn-action[b-8xxqprg1rg] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 36px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid;
    border-radius: 4px;
    cursor: pointer;
}

.btn-action:disabled[b-8xxqprg1rg] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Edit button */
.btn-edit[b-8xxqprg1rg] {
    color: #0d6efd;
    background: #fff;
    border-color: #999;
}

.btn-edit:hover:not(:disabled)[b-8xxqprg1rg] {
    color: #fff;
    background: #0d6efd;
}

/* Export/Import buttons */
.btn-export[b-8xxqprg1rg],
.btn-import[b-8xxqprg1rg] {
    width: 36px;
    min-width: 36px;
    padding: 0;
    color: #555;
    background: #fff;
    border-color: #999;
}

.btn-export:hover:not(:disabled)[b-8xxqprg1rg],
.btn-import:hover:not(:disabled)[b-8xxqprg1rg] {
    color: #fff;
    background: #555;
    border-color: #555;
}

/* Cancel button */
.btn-cancel[b-8xxqprg1rg] {
    color: #333;
    background: #fff;
    border-color: #999;
}

.btn-cancel:hover:not(:disabled)[b-8xxqprg1rg] {
    color: #fff;
    background: #333;
    border-color: #333;
}

/* Save button */
.btn-save[b-8xxqprg1rg] {
    min-width: 90px;
    color: #fff;
    background: #28a745;
    border-color: #28a745;
}

.btn-save:hover:not(:disabled)[b-8xxqprg1rg] {
    background: #218838;
    border-color: #1e7e34;
}

/* ============================================
   DATA TABLE
   ============================================ */
.table-responsive[b-8xxqprg1rg] {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.desktop-table[b-8xxqprg1rg] {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

/* Table Header */
.desktop-table thead[b-8xxqprg1rg] {
    background: #e9ecef !important;
}

.desktop-table thead th[b-8xxqprg1rg] {
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #495057;
    border-bottom: 2px solid #adb5bd;
    background: #e9ecef !important;
}

.desktop-table thead.text-secondary[b-8xxqprg1rg] {
    background: #e9ecef !important;
}

.desktop-table thead.text-secondary th[b-8xxqprg1rg] {
    background: #e9ecef !important;
}

/* Sort icons */
.fa-sort-up[b-8xxqprg1rg],
.fa-sort-down[b-8xxqprg1rg] {
    margin-left: 4px;
    font-size: 10px;
    color: #0d6efd;
}

/* Table Body */
.desktop-table tbody td[b-8xxqprg1rg] {
    padding: 6px 10px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desktop-table tbody tr:last-child td[b-8xxqprg1rg] {
    border-bottom: none;
}

.desktop-table tbody tr:hover[b-8xxqprg1rg] {
    background: #f9f9f9;
}

/* Table Footer */
.desktop-table tfoot td[b-8xxqprg1rg] {
    padding: 8px 10px;
    font-size: 13px;
    color: #666;
    background: #e9ecef;
    border-top: 2px solid #adb5bd;
}

/* ============================================
   READ-ONLY TABLE SPECIFIC STYLES
   ============================================ */
.desktop-table-readonly[b-8xxqprg1rg] {
    table-layout: fixed;
    width: 100%;
    max-width: 800px;
}

.desktop-table-readonly thead th[b-8xxqprg1rg] {
    font-size: 13px;
    padding: 10px 16px;
}

.desktop-table-readonly thead th:nth-child(1)[b-8xxqprg1rg] {
    width: 15%;
}

.desktop-table-readonly thead th:nth-child(2)[b-8xxqprg1rg] {
    width: 70%;
}

.desktop-table-readonly thead th:nth-child(3)[b-8xxqprg1rg] {
    width: 15%;
    text-align: right;
    padding-right: 16px;
}

.desktop-table-readonly tbody td[b-8xxqprg1rg] {
    padding: 10px 16px;
    font-size: 15px;
}

.desktop-table-readonly tbody td:nth-child(2)[b-8xxqprg1rg] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desktop-table-readonly tbody td:nth-child(3)[b-8xxqprg1rg] {
    text-align: right;
    padding-right: 16px;
    font-weight: 500;
}

/* ============================================
   EDIT MODE TABLE SPECIFIC STYLES
   ============================================ */
.desktop-table-edit tbody td[b-8xxqprg1rg] {
    padding: 8px 10px;
}

.desktop-table-edit .form-control-sm[b-8xxqprg1rg] {
    height: 32px;
    padding: 4px 8px;
    font-size: 14px;
    border: 1px solid #999;
    border-radius: 4px;
}

.desktop-table-edit .form-control-sm:focus[b-8xxqprg1rg] {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* ============================================
   ADD NEW ROW (GREEN - Distinctive)
   ============================================ */
.add-new-row[b-8xxqprg1rg] {
    background: #d1f2d5 !important;
}

.add-new-row td[b-8xxqprg1rg] {
    border-top: 1px solid #28a745 !important;
    border-bottom: 1px solid #28a745 !important;
}

.add-new-row td:first-child[b-8xxqprg1rg] {
    border-left: 1px solid #28a745 !important;
}

.add-new-row td:last-child[b-8xxqprg1rg] {
    border-right: 1px solid #28a745 !important;
}

.add-new-row:hover[b-8xxqprg1rg] {
    background: #b8e6bd !important;
}

/* ============================================
   EDITABLE ROW (LIGHT AMBER - Distinctive)
   ============================================ */
.editable-row[b-8xxqprg1rg] {
    background: #fff8e6 !important;
}

.editable-row td[b-8xxqprg1rg] {
    border-top: 1px solid #ffe0b2 !important;
    border-bottom: 1px solid #ffe0b2 !important;
}

.editable-row td:first-child[b-8xxqprg1rg] {
    border-left: 1px solid #ffe0b2 !important;
}

.editable-row td:last-child[b-8xxqprg1rg] {
    border-right: 1px solid #ffe0b2 !important;
}

.editable-row:hover[b-8xxqprg1rg] {
    background: #fff3cd !important;
}

/* ============================================
   IMPORT PREVIEW TABLE
   ============================================ */
[b-8xxqprg1rg] .modal-body {
    padding: 1rem;
}

[b-8xxqprg1rg] .modal-body .alert {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

[b-8xxqprg1rg] .modal-body .table-responsive {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 4px;
    overflow-x: auto;
    box-sizing: border-box;
}

[b-8xxqprg1rg] .modal-body .table {
    width: 100%;
    margin: 0;
    table-layout: auto;
}

[b-8xxqprg1rg] .modal-body .table-bordered {
    border: 1px solid #ccc;
}

[b-8xxqprg1rg] .modal-body .table-bordered th,
[b-8xxqprg1rg] .modal-body .table-bordered td {
    border: 1px solid #e5e5e5;
    padding: 6px 10px;
    font-size: 14px;
}

[b-8xxqprg1rg] .modal-body .thead-light th {
    background: #f5f5f5;
    border-bottom: 2px solid #ccc;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #555;
    white-space: nowrap;
}

[b-8xxqprg1rg] .table-warning,
[b-8xxqprg1rg] .table-warning > td,
[b-8xxqprg1rg] .table-warning > th {
    background: #fff8e6 !important;
}

[b-8xxqprg1rg] .table-warning:hover,
[b-8xxqprg1rg] .table-warning:hover > td,
[b-8xxqprg1rg] .table-warning:hover > th {
    background: #fff3cd !important;
}

[b-8xxqprg1rg] .table-success,
[b-8xxqprg1rg] .table-success > td,
[b-8xxqprg1rg] .table-success > th {
    background: #e8f5e9 !important;
}

[b-8xxqprg1rg] .table-success:hover,
[b-8xxqprg1rg] .table-success:hover > td,
[b-8xxqprg1rg] .table-success:hover > th {
    background: #c8e6c9 !important;
}

[b-8xxqprg1rg] .badge-warning {
    background: #ff9800;
    color: #fff;
}

[b-8xxqprg1rg] .badge-success {
    background: #198754;
    color: #fff;
}

/* Ensure alert banners match table width */
[b-8xxqprg1rg] .modal-body .alert {
    margin-left: 0;
    margin-right: 0;
}

/* ============================================
   MOBILE CARDS
   ============================================ */
.card[b-8xxqprg1rg] {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
}

.card-header[b-8xxqprg1rg] {
    padding: 10px 14px;
    font-weight: 600;
    border-bottom: 1px solid #ccc;
}

.card-body[b-8xxqprg1rg] {
    padding: 14px;
}

.add-new-card[b-8xxqprg1rg] {
    border: 2px solid #198754 !important;
}

.add-new-card .card-header[b-8xxqprg1rg] {
    background: #198754;
    border-bottom-color: #198754;
    color: #fff;
}

.card.border-warning[b-8xxqprg1rg] {
    border: 2px solid #ffc107 !important;
}

/* Mobile form controls */
.form-control-mobile[b-8xxqprg1rg] {
    width: 100%;
    height: 44px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #999;
    border-radius: 4px;
}

.form-control-mobile:focus[b-8xxqprg1rg] {
    outline: none;
    border-color: #0d6efd;
}

.btn-mobile[b-8xxqprg1rg] {
    height: 44px;
    font-size: 16px;
}

.form-group[b-8xxqprg1rg] {
    margin-bottom: 0;
}

.form-group label[b-8xxqprg1rg] {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.text-muted.py-5[b-8xxqprg1rg] {
    padding: 40px 14px !important;
}

.text-muted.py-5 i[b-8xxqprg1rg] {
    opacity: 0.4;
}

/* ============================================
   UTILITIES
   ============================================ */
.align-middle[b-8xxqprg1rg] {
    vertical-align: middle !important;
}

.text-truncate[b-8xxqprg1rg] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   RESPONSIVE - DESKTOP
   ============================================ */
@media (min-width: 768px) {
    .content-wrapper[b-8xxqprg1rg] {
        padding: 20px 24px;
    }

    .content-container[b-8xxqprg1rg] {
        max-width: 900px;
    }

    .desktop-header[b-8xxqprg1rg] {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }

    .mobile-header[b-8xxqprg1rg] {
        display: none !important;
    }

    .desktop-header[b-8xxqprg1rg] {
        display: block !important;
    }

    .filter-bar[b-8xxqprg1rg] {
        flex-wrap: nowrap;
        gap: 12px;
    }

    .filter-left[b-8xxqprg1rg] {
        flex-wrap: nowrap;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }

    .filter-right[b-8xxqprg1rg] {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .search-box[b-8xxqprg1rg] {
        flex: 0 1 180px;
        min-width: 120px;
        max-width: 200px;
    }

    .filter-with-icon[b-8xxqprg1rg] {
        flex: 0 1 auto;
        min-width: 80px;
    }

    .filter-select[b-8xxqprg1rg] {
        min-width: 60px;
        max-width: 120px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 767.98px) {
    .content-wrapper[b-8xxqprg1rg] {
        padding: 10px;
    }

    .mobile-header[b-8xxqprg1rg] {
        display: block !important;
    }

    .desktop-header[b-8xxqprg1rg] {
        display: none !important;
    }

    .filter-bar[b-8xxqprg1rg] {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }

    .filter-left[b-8xxqprg1rg] {
        flex-wrap: wrap;
        width: 100%;
    }

    .search-group[b-8xxqprg1rg] {
        order: -1;
        flex: 1 1 100%;
    }

    .search-box[b-8xxqprg1rg] {
        flex: 1;
        max-width: none;
        min-width: 0;
    }

    .result-count[b-8xxqprg1rg] {
        min-width: 36px;
        padding: 0 8px;
    }

    .filter-with-icon[b-8xxqprg1rg] {
        flex: 1 1 auto;
        min-width: 0;
    }

    .filter-select[b-8xxqprg1rg] {
        min-width: 0;
        max-width: none;
    }

    .btn-group[b-8xxqprg1rg] {
        width: 100%;
        margin-top: 4px;
    }

    .btn-group .btn-action[b-8xxqprg1rg] {
        flex: 1;
    }

    .btn-action[b-8xxqprg1rg] {
        height: 40px;
    }
}
