/**
 * HTB Live Feed - Admin Styles
 */

/* ============================================================
   Tabbed meta box
   ============================================================ */
.xtfeprofeed-feed-tabs {
  margin: -6px -12px -12px;
}

.xtfeprofeed-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 2px solid #e2e4e7;
  background: #f6f7f7;
}

.xtfeprofeed-tabs-nav li { margin: 0; }

.xtfeprofeed-tabs-nav a {
  display: block;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #50575e;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s ease, border-color .15s ease;
}

.xtfeprofeed-tabs-nav a:hover { color: #1877F2; }
.xtfeprofeed-tabs-nav a.active { color: #1877F2; border-bottom-color: #1877F2; background: #fff; }

.xtfeprofeed-tab-content {
  display: none;
  padding: 20px 16px;
}

.xtfeprofeed-tab-content.active { display: block; }

/* ============================================================
   Form table adjustments
   ============================================================ */
.xtfeprofeed-form-table th {
  width: 200px;
  padding: 12px 10px 12px 0;
  vertical-align: top;
  font-size: 13px;
}

.xtfeprofeed-form-table td { padding: 10px 0; vertical-align: top; }

/* Consistent dropdown and input width */
.xtfeprofeed-form-table select,
.xtfeprofeed-form-table input[type="text"],
.xtfeprofeed-form-table input[type="number"] {
  min-width: 280px;
  width: 100%;
  max-width: 100%;
}

/* ============================================================
   Layout picker
   ============================================================ */
.xtfeprofeed-layout-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.xtfeprofeed-layout-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all .2s ease;
  background: #f8fafc;
}

.xtfeprofeed-layout-option input[type="radio"] { display: none; }

.xtfeprofeed-layout-option:hover {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.xtfeprofeed-layout-option.active,
.xtfeprofeed-layout-option:has(input:checked) {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.xtfeprofeed-layout-icon { font-size: 24px; line-height: 1; }
.xtfeprofeed-layout-label { font-size: 12px; font-weight: 600; color: #50575e; }

.xtfeprofeed-layout-option.xtfeprofeed-layout-pro-only {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #ccd0d4;
  background: #f6f7f7;
}

.xtfeprofeed-layout-option.xtfeprofeed-layout-pro-only:hover {
  border-color: #ccd0d4;
  background: #f6f7f7;
}

.xtfeprofeed-layout-option.xtfeprofeed-layout-pro-only * {
  pointer-events: none;
}

/* ============================================================
   Copy shortcode (list table)
   ============================================================ */
.xtfeprofeed-copy-shortcode {
  display: inline-block;
  background: #f6f7f7;
  border: 1px solid #e2e4e7;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 12px;
  transition: background .15s;
}

.xtfeprofeed-copy-shortcode:hover { background: #e7f3ff; border-color: #1877F2; }

/* ============================================================
   Cache clear feedback
   ============================================================ */
#xtfeprofeed-clear-cache-msg {
  font-size: 13px;
  font-weight: 600;
}

#xtfeprofeed-clear-cache-msg.success { color: #3d9b35; }
#xtfeprofeed-clear-cache-msg.error   { color: #d1293d; }

/* ============================================================
   Two-column Builder Layout
   ============================================================ */
.xtfeprofeed-builder-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-top: 10px;
}

.xtfeprofeed-builder-left {
  flex: 1;
  min-width: 0;
}

.xtfeprofeed-builder-right {
  width: 400px;
  position: -webkit-sticky;
  position: sticky;
  top: 50px;
  flex-shrink: 0;
  z-index: 99;
}

/* ============================================================
   Preview Panel Styling
   ============================================================ */
.xtfeprofeed-preview-panel {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.04);
  overflow: hidden;
}

.xtfeprofeed-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e4e7;
  background: #f6f7f7;
}

.xtfeprofeed-preview-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #23282d;
}

.xtfeprofeed-preview-loading {
  font-size: 11px;
  color: #1877F2;
  font-weight: 600;
  animation: xtfepro-loading-fade 1s infinite alternate;
}

@keyframes xtfepro-loading-fade {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

.xtfeprofeed-preview-body {
  padding: 16px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  background: #f0f0f1;
}

.xtfeprofeed-preview-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: #646970;
}

.xtfeprofeed-preview-placeholder p {
  margin: 0;
  font-size: 13px;
}

#xtfeprofeed-preview-container .xtfeprofeed-feed-wrap {
  background: transparent;
  padding: 0;
}

/* Legacy metabox sidebar preview: no pagination (frontend-only) */
#xtfeprofeed-preview-container .xtfeprofeed-pagination,
#xtfeprofeed-preview-container .xtfeprofeed-pagination-nav,
#xtfeprofeed-preview-container .xtfeprofeed-load-more-wrap,
#xtfeprofeed-preview-container .xtfeprofeed-infinite-sentinel {
  display: none !important;
}

