/* NexoCRM — outbound webhooks UI (Phase 8) */

.wh-table { width: 100%; border-collapse: collapse; }
.wh-table th, .wh-table td { padding: .7rem .6rem; text-align: left; border-bottom: 1px solid #e2e8f0; font-size: .9rem; vertical-align: middle; }
.wh-table th { font-weight: 600; color: #475569; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.wh-table tbody tr:hover { background: #f8fafc; }
.wh-url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; color: #475569; }

/* Status pills */
.wh-pill { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.wh-pill-active   { background: #dcfce7; color: #166534; }
.wh-pill-failing  { background: #fef3c7; color: #92400e; }
.wh-pill-disabled { background: #e2e8f0; color: #475569; }

/* Delivery badges */
.wh-badge { display: inline-block; padding: .15rem .5rem; border-radius: 6px; font-size: .74rem; font-weight: 600; }
.wh-badge-ok      { background: #dcfce7; color: #166534; }
.wh-badge-warn    { background: #fef3c7; color: #92400e; }
.wh-badge-dead    { background: #fee2e2; color: #991b1b; }
.wh-badge-pending { background: #e0e7ff; color: #3730a3; }

/* Secret reveal box */
.wh-secret-box { border: 2px solid #6366f1; border-radius: 12px; padding: 1rem 1.15rem; background: #eef2ff; margin-bottom: 1.25rem; }
.wh-secret-code { background: #0f172a; color: #e2e8f0; padding: .7rem .9rem; border-radius: 8px; font-size: .9rem;
                  word-break: break-all; flex: 1; min-width: 240px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.wh-warn { color: #92400e; background: #fffbeb; border-left: 3px solid #f59e0b; padding: .6rem .8rem; border-radius: 0 6px 6px 0; font-size: .88rem; }

/* Event checkbox grid */
.wh-event-group { margin-bottom: 1rem; }
.wh-event-group h4 { margin: 0 0 .5rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: #6366f1; }
.wh-event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .4rem; }
.wh-event-item { display: flex; gap: .5rem; align-items: flex-start; padding: .45rem .6rem; border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer; }
.wh-event-item:hover { background: #f8fafc; border-color: #c7d2fe; }
.wh-event-item input { margin-top: .2rem; }
.wh-event-item code { font-size: .8rem; color: #0f172a; }
.wh-event-item small { display: block; color: #64748b; font-size: .76rem; }

/* Header key/value rows */
.wh-header-row { display: flex; gap: .5rem; margin-bottom: .5rem; align-items: center; }
.wh-header-row input { flex: 1; }

/* Code sample tabs */
.wh-tabs { display: flex; gap: .35rem; margin-bottom: .6rem; flex-wrap: wrap; }
.wh-tab { padding: .35rem .85rem; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff; cursor: pointer; font-size: .85rem; }
.wh-tab.active { background: #6366f1; color: #fff; border-color: #6366f1; }
.wh-code { background: #0f172a; color: #e2e8f0; padding: 1rem; border-radius: 10px; overflow-x: auto; font-size: .82rem; line-height: 1.5; }
.wh-code pre { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Expandable delivery rows */
.wh-expand { cursor: pointer; }
.wh-detail-cell { background: #f8fafc; padding: 0 !important; }
.wh-detail-inner { padding: .9rem 1rem; }
.wh-detail-inner h5 { margin: .6rem 0 .3rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #64748b; }
.wh-detail-inner pre { background: #0f172a; color: #e2e8f0; padding: .75rem; border-radius: 8px; overflow-x: auto;
                       font-size: .78rem; margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }

.wh-empty { text-align: center; padding: 2.5rem 1rem; color: #64748b; }
.wh-meta { color: #64748b; font-size: .84rem; }

@media (max-width: 720px) {
  .wh-table thead { display: none; }
  .wh-table tbody tr { display: block; border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: .7rem; padding: .5rem; }
  .wh-table td { display: flex; justify-content: space-between; gap: 1rem; border: none; padding: .35rem .4rem; }
  .wh-table td::before { content: attr(data-label); font-weight: 600; color: #64748b; font-size: .78rem; }
}
