/* ═══════════════════════════════════════════════════════════════
   styles-bulk.css
   Bulk CSV upload screen: drop zone, validation table, row status
   badges, upload progress, and the shared success screen.
   Also contains the Endpoint Schema Editor table styles.
   Depends on: styles-base.css
═══════════════════════════════════════════════════════════════ */

/* Step label inside a card (e.g. "STEP 1 OF 3") */
.bulk-step-num {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
    margin-bottom: 8px;
}

/* ═══════════════════════════════
   BULK CSV UPLOAD SPECIFIC
═══════════════════════════════ */
.bulk-template-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tmeta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tmeta-key {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text3);
    font-family: var(--mono);
}

.tmeta-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.drop-zone {
    border: 2px dashed var(--border2);
    border-radius: 12px;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    background: var(--s2);
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(14, 165, 233, .05);
}

.dz-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.dz-text {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.dz-sub {
    font-size: 13px;
    color: var(--text3);
    margin-bottom: 14px;
}

#uploadStatus {
    margin-top: 14px;
}

/* Validation table */
.val-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-top: 14px;
}

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

.val-table th {
    background: var(--s2);
    padding: 8px 12px;
    text-align: left;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text3);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.val-table td {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(30, 45, 66, .5);
    vertical-align: top;
}

.val-table tr:last-child td {
    border-bottom: none;
}

.val-table tr.row-ok td {
    background: rgba(34, 197, 94, .03);
}

.val-table tr.row-err td {
    background: rgba(239, 68, 68, .04);
}

.val-table tr.row-skip td {
    background: rgba(100, 116, 139, .04);
    opacity: .6;
}

/* Row status badges */
.row-status {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
}

.rs-ok {
    background: rgba(34, 197, 94, .12);
    color: var(--green);
}

.rs-err {
    background: rgba(239, 68, 68, .12);
    color: var(--red);
}

.rs-skip {
    background: rgba(100, 116, 139, .12);
    color: var(--text3);
}

.rs-sub {
    background: rgba(14, 165, 233, .12);
    color: var(--accent);
}

.rs-done {
    background: rgba(34, 197, 94, .2);
    color: var(--green);
}

.rs-fail {
    background: rgba(239, 68, 68, .2);
    color: var(--red);
}

.rs-wait {
    background: rgba(100, 116, 139, .12);
    color: var(--text3);
}

.row-errs {
    font-size: 11px;
    color: var(--red);
    margin-top: 3px;
    line-height: 1.5;
}

.row-name {
    font-weight: 600;
    color: var(--text);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-type {
    font-family: var(--mono);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--s3);
    color: var(--text3);
}

.row-api-msg {
    font-size: 11px;
    color: var(--text3);
    margin-top: 3px;
}

.row-api-id {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--accent2);
    margin-top: 2px;
}

.bulk-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
    align-items: center;
}

.bulk-actions-info {
    font-size: 13px;
    color: var(--text2);
    margin-left: auto;
}

.bulk-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
}

/* ═══════════════════════════════
   SUCCESS SCREEN
   (shared by wizard + bulk completion states)
═══════════════════════════════ */
.success-screen {
    text-align: center;
    padding: 56px 20px;
}

.suc-icon {
    font-size: 60px;
    margin-bottom: 18px;
}

.suc-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
}

.suc-sub {
    font-size: 14px;
    color: var(--text2);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* ══════════════════════════════════════
   ENDPOINT SCHEMA EDITOR
══════════════════════════════════════ */
.ep-editor-wrap {
    margin: 0;
}

/* Stats bar */
.ep-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: rgba(14, 165, 233, .05);
    border-radius: 8px;
    border: 1px solid rgba(14, 165, 233, .12);
}

.ep-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ep-stat-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.ep-stat-key {
    font-size: 10px;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text3);
}

/* Toolbar */
.ep-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.ep-toolbar input[type="text"] {
    flex: 1;
    min-width: 160px;
}

.btn-ep-add {
    background: rgba(14, 165, 233, .15);
    border: 1px solid rgba(14, 165, 233, .3);
    color: var(--accent2);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}

.btn-ep-add:hover {
    background: rgba(14, 165, 233, .25);
}

/* Table */
.ep-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.ep-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ep-table th {
    background: var(--s2);
    padding: 8px 10px;
    text-align: left;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text3);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.ep-table td {
    padding: 7px 8px;
    border-bottom: 1px solid rgba(30, 45, 66, .5);
    vertical-align: middle;
}

.ep-table tr:last-child td {
    border-bottom: none;
}

.ep-table tr:hover td {
    background: rgba(255, 255, 255, .02);
}

/* Visible toggle */
.ep-vis-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: opacity .15s;
}

.ep-vis-btn:hover {
    opacity: .7;
}

/* Type chip */
.ep-type-chip {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ep-type-STRING {
    background: rgba(14, 165, 233, .12);
    color: #38bdf8;
}

.ep-type-INTEGER {
    background: rgba(34, 197, 94, .12);
    color: #4ade80;
}

.ep-type-FLOAT {
    background: rgba(245, 158, 11, .12);
    color: #fbbf24;
}

.ep-type-BOOLEAN {
    background: rgba(168, 85, 247, .12);
    color: #c084fc;
}

.ep-type-DATE {
    background: rgba(239, 68, 68, .12);
    color: #f87171;
}

.ep-type-UNKNOWN {
    background: rgba(100, 116, 139, .12);
    color: var(--text3);
}

/* Inputs in table */
.ep-table input[type="text"],
.ep-table select {
    background: var(--s2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 12px;
    padding: 4px 8px;
    width: 100%;
    min-width: 80px;
}

.ep-table input[type="text"]:focus,
.ep-table select:focus {
    border-color: var(--accent);
    outline: none;
}

/* Filter row */
.ep-filter-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.ep-filter-row select {
    width: 120px;
    flex-shrink: 0;
}

.ep-filter-row input {
    flex: 1;
    min-width: 100px;
}

/* Pagination */
.ep-pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text2);
}

.ep-page-info {
    font-size: 12px;
}

/* Marketplace disabled notice */
.ep-marketplace-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: rgba(245, 158, 11, .06);
    border: 1px solid rgba(245, 158, 11, .2);
    border-radius: 10px;
    margin-bottom: 4px;
}

.ep-marketplace-notice-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.ep-marketplace-notice-text {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.6;
}

.ep-marketplace-notice-text strong {
    color: var(--text);
}

/* Accordion disabled state */
.acc-disabled {
    opacity: .45;
    pointer-events: none;
}