/*
  Copyright (c) 2026 Blue Astra Technologies LLP, India. All Rights Reserved.
  Proprietary software. Unauthorized copying or use by any means or technology
  (including AI tools) is strictly prohibited.
*/
/* =====================================================
   PROPOSAL WEB-SERVICE INTEGRATIONS  (Proposals > Integrations)
   Catalog cards, the connect dialog, and the push/pull workbench.
   ===================================================== */

/* ---- Header tier chip and the note under it ---- */
.pxi-tier {
    font-size: 0.62em;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: var(--theme-soft, #eef2ff);
    color: var(--theme-primary, #4b5bdc);
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 6px;
}
.pxi-warn {
    display: inline-block;
    background: #fff4e5;
    color: #b45309;
    border: 1px solid #fcd9a4;
    border-radius: 8px;
    padding: 1px 8px;
    font-size: 0.92em;
}

/* ---- Locked panel (Basic / Swift) ---- */
.pxi-locked {
    grid-column: 1 / -1;
    border: 1px dashed #d8dee9;
    background: #fbfcfe;
    border-radius: 12px;
    padding: 18px 20px;
}
.pxi-locked-head {
    font-weight: 700;
    color: #16233a;
    margin-bottom: 10px;
}
.pxi-locked-head i { color: var(--theme-primary, #4b5bdc); margin-right: 6px; }
.pxi-locked ul { list-style: none; padding: 0; margin: 0 0 14px; }
.pxi-locked li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 0.88rem;
    color: #46536b;
    padding: 3px 0;
}
.pxi-locked li i { color: #2ecc71; margin-top: 3px; }

/* ---- Catalog grid ---- */
.pxi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.pxi-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 12px;
    padding: 14px;
}
.pxi-card-on { border-color: #d7e6ff; }
.pxi-card-open { border-color: var(--theme-primary, #4b5bdc); box-shadow: 0 2px 12px rgba(75, 91, 220, 0.12); }

.pxi-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.pxi-logo { width: 30px; height: 30px; flex: 0 0 auto; }
.pxi-logo-fa { font-size: 24px; color: var(--theme-primary, #4b5bdc); width: 30px; text-align: center; }
.pxi-card-title { flex: 1; min-width: 120px; line-height: 1.25; }
.pxi-card-title strong { display: block; color: #16233a; font-size: 0.95rem; }
.pxi-card-title span { font-size: 0.72rem; color: #8a93a3; }

.pxi-state {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.pxi-state i { font-size: 0.5em; vertical-align: middle; margin-right: 3px; }
.pxi-state-on { background: #e2f7f4; color: #0d8a80; }
.pxi-state-off { background: #f1f3f7; color: #8a93a3; }
.pxi-state-warn { background: #fff1e0; color: #c2600a; }
.pxi-state-sandbox { background: #ede7ff; color: #6d3fe0; margin-left: 4px; }

.pxi-summary { font-size: 0.82rem; color: #5b6577; margin: 0; line-height: 1.45; }

.pxi-caps { display: flex; flex-wrap: wrap; gap: 5px; }
.pxi-cap {
    font-size: 0.68rem;
    background: #f4f6fb;
    color: #56617a;
    border: 1px solid #e8ecf5;
    border-radius: 8px;
    padding: 2px 7px;
}

.pxi-meta { font-size: 0.72rem; color: #8a93a3; }
.pxi-error { font-size: 0.74rem; color: #c0392b; line-height: 1.4; }

.pxi-card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }

/* ---- Connect dialog ---- */
.pxi-modal-note { font-size: 0.84rem; color: #5b6577; margin: 0 0 14px; line-height: 1.5; }
.pxi-modal-note a { color: var(--theme-primary, #4b5bdc); font-weight: 600; }
.pxi-field small { display: block; font-size: 0.72rem; color: #8a93a3; margin-top: 4px; line-height: 1.4; }
.pxi-details { margin: 4px 0 14px; }
.pxi-details summary { cursor: pointer; font-size: 0.82rem; color: var(--theme-primary, #4b5bdc); font-weight: 600; }
.pxi-details > .form-group { margin-top: 10px; }

.pxi-modes { display: flex; flex-direction: column; gap: 8px; }
.pxi-mode {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 0.82rem;
    color: #46536b;
    border: 1px solid #eef1f6;
    border-radius: 9px;
    padding: 9px 11px;
    cursor: pointer;
}
.pxi-mode input { margin-top: 3px; }
.pxi-mode-disabled { opacity: 0.55; cursor: not-allowed; }

.pxi-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ---- Workbench ---- */
.pxi-bench {
    margin-top: 16px;
    border: 1px solid #e3e9f5;
    border-radius: 12px;
    background: #fbfcff;
    padding: 14px;
}
.pxi-bench-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.pxi-bench-head h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.98rem;
    color: #16233a;
    flex: 1;
    min-width: 200px;
}
.pxi-bench-head .pxi-logo, .pxi-bench-head .pxi-logo-fa { width: 22px; height: 22px; font-size: 18px; }

.pxi-bench-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
}
.pxi-panel {
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 10px;
    padding: 12px 14px;
}
.pxi-panel h5 {
    margin: 0 0 10px;
    font-size: 0.85rem;
    color: #16233a;
    display: flex;
    align-items: center;
    gap: 7px;
}
.pxi-panel h5 i { color: var(--theme-primary, #4b5bdc); }
.pxi-panel .form-group { margin-bottom: 10px; }
.pxi-panel small { display: block; font-size: 0.72rem; color: #8a93a3; margin-top: 4px; }
.pxi-panel-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pxi-panel-actions select {
    padding: 7px 9px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.8rem;
}

.pxi-pushed {
    margin-top: 12px;
    background: #f2fbf8;
    border: 1px solid #d3ede6;
    border-radius: 9px;
    padding: 10px 12px;
    font-size: 0.82rem;
    color: #0d6f66;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pxi-pushed code {
    background: #fff;
    border: 1px solid #d3ede6;
    border-radius: 5px;
    padding: 0 5px;
    font-size: 0.92em;
}

.pxi-remote-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 280px; overflow-y: auto; }
.pxi-remote {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    border: 1px solid #eef1f6;
    border-radius: 8px;
    padding: 8px 10px;
}
.pxi-remote strong { display: block; font-size: 0.82rem; color: #16233a; }
.pxi-remote span { font-size: 0.72rem; color: #8a93a3; }
.pxi-remote-actions { display: flex; gap: 6px; flex: 0 0 auto; }

/* ---- Activity log ---- */
.pxi-activity { margin-top: 12px; }
.pxi-activity h5 {
    margin: 0 0 8px;
    font-size: 0.82rem;
    color: #16233a;
    display: flex;
    align-items: center;
    gap: 7px;
}
.pxi-event {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 0.76rem;
    padding: 5px 8px;
    border-radius: 7px;
    background: #fff;
    border: 1px solid #eef1f6;
    margin-bottom: 4px;
}
.pxi-event.ok i { color: #2ecc71; }
.pxi-event.bad i { color: #c0392b; }
.pxi-event-action { font-weight: 700; color: #46536b; text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.03em; }
.pxi-event-msg { flex: 1; color: #5b6577; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pxi-event-meta { color: #a3abb9; white-space: nowrap; font-size: 0.7rem; }

@media (max-width: 640px) {
    .pxi-bench-cols { grid-template-columns: 1fr; }
    .pxi-remote { flex-direction: column; align-items: flex-start; }
}
