/* ===== Permit Builder ===== */

.permit-builder__sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.permit-builder__add-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding: 16px 0;
}

/* ===== Section Card ===== */

.section-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.section-card--collapsed {
    border-color: #e0e0e0;
}

.section-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f5f7fa;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    user-select: none;
}

.section-card--collapsed .section-card__header {
    border-bottom: none;
}

.section-card__header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-card__header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-card__toggle {
    font-size: 16px;
    font-weight: bold;
    color: #666;
    width: 20px;
    text-align: center;
}

.section-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #003369;
}

.section-card__badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e8eef4;
    color: #003369;
    font-weight: 500;
}

.section-card__body {
    padding: 16px;
}

/* ===== Excel Section Viewer ===== */

.excel-section-viewer {
    overflow: visible;
}

.excel-section-viewer table {
    border-collapse: collapse;
    width: 100%;
    table-layout: auto !important;
}

.excel-section-viewer td,
.excel-section-viewer th {
    padding: 3px 5px;
    font-size: 13px;
}

/* ===== Requirements Section Editor ===== */

.requirements-section-editor .data-table {
    width: 100%;
}

.requirements-section-editor .data-table td,
.requirements-section-editor .data-table th {
    font-size: 13px;
}

/* ===== Column Grouping ===== */

.requirements-section-editor .group-header,
.data-table .group-header {
    text-align: center;
    background: #dce6f0;
    color: #1a2a3a;
    font-weight: 600;
    border-bottom: 2px solid #c5d3e0;
}

.criteria-column-child td:nth-child(2) {
    padding-left: 32px;
}

.criteria-column-group {
    background: #f5f7fa;
    font-weight: 600;
}

/* ===== Insert-Between Hover Zones ===== */

.insert-between-row > td {
    padding: 0 !important;
    border: none !important;
    line-height: 0;
}

.insert-between-zone {
    height: 6px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.insert-between-zone::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: transparent;
    transition: background 0.15s;
    pointer-events: none;
}

.insert-between-zone:hover::before {
    background: rgba(13, 110, 253, 0.35);
}

.insert-between-actions {
    display: none;
    position: absolute;
    z-index: 10;
    gap: 4px;
    background: #fff;
    padding: 2px 6px;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.insert-between-zone:hover .insert-between-actions {
    display: flex;
    align-items: center;
}

.insert-between-actions .insert-btn {
    font-size: 11px;
    padding: 1px 10px;
    border: 1px solid #0d6efd;
    background: #fff;
    color: #0d6efd;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    line-height: 18px;
    transition: background 0.1s, color 0.1s;
}

.insert-between-actions .insert-btn:hover {
    background: #0d6efd;
    color: #fff;
}
