/* MapTrax v2.7.0.0 — Wells / Permits / Production styling
   Covers: sidebar toggles, post-import summary modal, drawer tabs. */

/* -----------------------------------------------------------
   Sidebar entity toggle group
   ----------------------------------------------------------- */

.entity-toggle-group .checkbox-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin: 4px 0;
    cursor: pointer;
    user-select: none;
}

.entity-toggle-group .checkbox-row input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.entity-color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.entity-count-badge {
    margin-left: auto;
    font-size: 10px;
    color: #888;
    background: #f0f0f0;
    padding: 1px 6px;
    border-radius: 8px;
    min-width: 20px;
    text-align: center;
}

/* v2.13.2.11: per-entity trashcan that clears Wells/Permits/Production
 * without touching Tracts or Assets. Hidden via the `hidden` attribute
 * (toggled by entityActions.refreshEntityChrome) when the store is
 * empty so the row stays visually clean. */
.entity-clear-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #b96c28;
    font-size: 13px;
    line-height: 1;
    padding: 2px 5px;
    margin-left: 4px;
    border-radius: 3px;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.65;
    transition: opacity 0.12s, background 0.12s, border-color 0.12s, color 0.12s;
}

.entity-clear-btn:hover {
    opacity: 1;
    background: #fbe8d8;
    border-color: #d47e2f;
    color: #8a3c0e;
}

/* -----------------------------------------------------------
   Post-import summary modal
   ----------------------------------------------------------- */

.import-summary-dialog {
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.import-summary-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.import-summary-header h3 {
    margin: 0;
    font-size: 18px;
    color: #222;
}

.import-summary-body {
    padding: 18px 20px;
    overflow-y: auto;
}

.import-summary-counts {
    background: #f0f8f0;
    border-left: 3px solid #22C55E;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 14px;
    color: #1a4a1a;
}

.import-summary-counts .muted {
    color: #777;
    font-weight: normal;
}

.import-summary-clean {
    color: #1a4a1a;
    font-size: 13px;
}

.import-summary-issue {
    border: 1px solid #f5e0a3;
    background: #fffbe8;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 10px;
}

.import-summary-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.import-summary-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.import-summary-text {
    flex: 1;
    font-size: 13px;
    color: #4d3a08;
}

.import-summary-text .muted {
    color: #888;
    font-size: 12px;
}

.import-summary-issue .link-btn {
    background: none;
    border: none;
    color: #2b6cb0;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    padding: 0;
    flex-shrink: 0;
}

.import-summary-list {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f5e0a3;
}

.import-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.import-summary-table th,
.import-summary-table td {
    border: 1px solid #e5d8a0;
    padding: 4px 8px;
    text-align: left;
    vertical-align: top;
}

.import-summary-table th {
    background: #fff3c4;
    font-weight: 600;
    color: #4d3a08;
}

.import-summary-footer {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.import-summary-footer button {
    padding: 7px 18px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.import-summary-footer button.primary {
    background: #2b6cb0;
    border-color: #2b6cb0;
    color: white;
}

.import-summary-footer button.primary:hover {
    background: #1f4d80;
}

#import-summary-backdrop.wizard-backdrop {
    z-index: 9100;  /* above the wizard so it appears after wizard closes */
}

/* -----------------------------------------------------------
   Attribute drawer tabs (Tracts / Wells / Permits / Production)
   ----------------------------------------------------------- */

.drawer-tab-strip {
    display: flex;
    gap: 4px;
    padding: 6px 8px 0;
    border-bottom: 1px solid #ddd;
    background: #fafafa;
}

.drawer-tab {
    padding: 6px 14px 6px 12px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    background: #ececec;
    color: #555;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.drawer-tab:hover {
    background: #e0e0e0;
}

.drawer-tab.active {
    background: white;
    border-color: #ddd;
    border-bottom: 1px solid white;
    color: #222;
    font-weight: 600;
    margin-bottom: -1px;
    position: relative;
    z-index: 1;
}

.drawer-tab .drawer-tab-count {
    font-size: 10px;
    color: #888;
    background: #f5f5f5;
    padding: 1px 6px;
    border-radius: 8px;
}

.drawer-tab.active .drawer-tab-count {
    background: #f0f8f0;
    color: #1a8c44;
}

.drawer-tab.empty {
    color: #aaa;
    background: #f5f5f5;
}

.drawer-tab.empty .drawer-tab-count {
    color: #bbb;
}

/* v2.13.2.11: per-tab clear button (Wells/Permits/Production), only
 * rendered when Edit Mode is active. Sits inline at the right of the
 * tab pill; clicking it routes to window.clearEntityWithConfirm. */
.drawer-tab .drawer-tab-clear {
    margin-left: 6px;
    padding: 0 5px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    color: #b96c28;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.12s, background 0.12s, border-color 0.12s, color 0.12s;
}
.drawer-tab .drawer-tab-clear:hover {
    opacity: 1;
    background: #fbe8d8;
    border-color: #d47e2f;
    color: #8a3c0e;
}
/* v2.13.2.13: the active tab is white-on-white-background, so the
 * × needs to stay the same brown accent (not switch to white).
 * Slightly bumped opacity so it reads against the active-tab's
 * stronger contrast. */
.drawer-tab.active .drawer-tab-clear {
    color: #b96c28;
    opacity: 0.95;
}
.drawer-tab.active .drawer-tab-clear:hover {
    background: #fbe8d8;
    border-color: #d47e2f;
    color: #8a3c0e;
}
