/* These styles are generated from project.scss. */

.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

/* ============================================
   Split-Pane Layout (independent scroll)
   ============================================ */
.split-pane-row {
    display: flex;
    height: calc(100vh - 72px);
    overflow: hidden;
}

.sidebar-pane {
    width: 320px;
    min-width: 280px;
    max-width: 360px;
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 16px 16px 0;
    flex-shrink: 0;
}

.sidebar-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 16px;
}

.detail-pane {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    background-color: #fff;
}

/* ============================================
   Status Summary
   ============================================ */
.status-summary {
    padding: 10px 12px;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin-bottom: 12px;
}

/* ============================================
   Collapsible Filter Form
   ============================================ */
.filter-toggle-btn {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 4px;
}

.filter-form {
    padding: 12px;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin-bottom: 12px;
}

/* ============================================
   Request Cards
   ============================================ */
.request-card {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-left: 3px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    margin-bottom: 10px;
}

.request-card:hover {
    border-left-color: #adb5bd;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.request-card.active {
    border-left-color: #0d6efd;
    background-color: #f0f6ff;
    box-shadow: 0 1px 6px rgba(13, 110, 253, 0.1);
}

.request-card.active .request-card-header {
    background-color: #e8f0fe;
}

.request-card-header {
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
}

.request-card-body {
    padding: 8px 12px;
}

.request-label,
.transaction-label {
    font-weight: 600;
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   UUID Display & Copy
   ============================================ */
.uuid-display {
    display: inline-block;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.78rem;
    background-color: transparent;
    color: #495057;
    padding: 2px 0;
}

.uuid-truncated {
    cursor: pointer;
    position: relative;
}

.uuid-truncated:hover {
    color: #0d6efd;
}

.uuid-truncated .copy-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #212529;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

.uuid-truncated .copy-tooltip.show {
    display: block;
}

.uuid-link {
    color: #0d6efd;
    text-decoration: none;
}

.uuid-link:hover {
    text-decoration: underline;
}

/* ============================================
   Transaction Items in Sidebar
   ============================================ */
.transaction-item {
    padding: 6px 0;
    border-top: 1px solid #f0f0f0;
}

.transaction-item:first-child {
    border-top: none;
    padding-top: 4px;
}

.transaction-item-clickable {
    cursor: pointer;
    border-radius: 4px;
    padding: 6px 8px;
    margin: 0 -8px;
}

.transaction-item-clickable:hover {
    background-color: #e9ecef;
}

/* ============================================
   Unified Status Badges
   ============================================ */
.badge-new {
    background-color: #cfe2ff !important;
    color: #084298 !important;
}

.badge-processing,
.badge-ongoing {
    background-color: #fff3cd !important;
    color: #664d03 !important;
}

.badge-approved,
.badge-completed {
    background-color: #d1e7dd !important;
    color: #0f5132 !important;
}

.badge-declined {
    background-color: #f8d7da !important;
    color: #842029 !important;
}

.badge-hold {
    background-color: #e2e3e5 !important;
    color: #41464b !important;
}

.badge-canceled,
.badge-expired {
    background-color: #d3d3d4 !important;
    color: #505254 !important;
}

.transaction-state-badge {
    font-size: 0.68rem;
    font-weight: 600;
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 4px;
}

/* ============================================
   Detail Pane: Empty State
   ============================================ */
.detail-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
}

.detail-empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.detail-empty-state p {
    font-size: 1rem;
    margin: 0;
}

.detail-empty-state .empty-hint {
    font-size: 0.85rem;
    margin-top: 4px;
}

/* ============================================
   Detail Pane: Section Cards
   ============================================ */
.detail-section {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.detail-section-header {
    background-color: #f8f9fa;
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.detail-section-header:hover {
    background-color: #f0f1f3;
}

.detail-section-header h5 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.detail-section-header .section-toggle-icon {
    transition: transform 0.2s ease;
    font-size: 0.8rem;
    color: #6c757d;
}

.detail-section-header.collapsed .section-toggle-icon {
    transform: rotate(-90deg);
}

.detail-section-body {
    padding: 16px;
}

/* Key-Value Pair Layout */
.kv-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 16px;
    font-size: 0.875rem;
}

.kv-label {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.kv-value {
    color: #212529;
    word-break: break-word;
}

/* Detail header bar */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
}

.detail-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

/* ============================================
   Tables inside detail sections
   ============================================ */
.detail-section .table {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.detail-section .table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #6c757d;
    font-weight: 600;
    border-bottom-width: 1px;
    white-space: nowrap;
}

.detail-section .table td {
    vertical-align: middle;
}

.table-responsive-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   HTMX Loading Indicator
   ============================================ */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6c757d;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e9ecef;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    font-size: 0.8rem;
    padding: 4px 10px;
}

/* ============================================
   Proof item cards (inside proof requests)
   ============================================ */
.proof-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.proof-item:last-child {
    margin-bottom: 0;
}

.proof-valid {
    color: #0f5132;
}

.proof-invalid {
    color: #842029;
}

/* ============================================
   Notes
   ============================================ */
.note-item {
    padding: 10px 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 0.875rem;
    border-left: 3px solid #0d6efd;
}

.note-item:last-child {
    margin-bottom: 0;
}

/* ============================================
   Sidebar heading
   ============================================ */
.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #212529;
}
