/* ADMIN (solo dentro de tu página) */
.telo-aff-admin .telo_copy_btn { margin-left: 6px; }
.telo-aff-admin details summary { font-weight: 600; }
.telo-aff-admin .telo-aff-payout-box {
  margin-top: 6px; padding: 8px; border: 1px solid #ddd; background: #fafafa;
}
.telo-aff-admin table.widefat td small { color: #666; }

/* FRONTEND (solo dentro del shortcode / página pública) */
.telo-aff-frontend .telo-aff-card { 
  border: 1px solid #e5e5e5; border-radius: 8px; padding: 12px; margin-bottom: 16px;
}
.telo-aff-frontend .telo-aff-actions { display: flex; gap: 8px; align-items: center; }
.telo-aff-frontend .telo_copy_btn { font-size: .9rem; }

.telo-affiliate-form-add-affiliate {
  margin-bottom: 24px;
  display: flex;
  gap: 8px;
}

.telo-aff-new-affiliate-header-full {
  display: flex;
  width: 100%;
  justify-content: space-between;
}

.telo-col-afiliados-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.historial-pagos-shortcode {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #eee;
}

/* === Payouts table (shortcode) === */
.telo-aff-frontend .telo-aff-section { margin-top: 20px; }
.telo-aff-frontend .telo-aff-title { margin: 0 0 8px; }
.telo-aff-frontend .telo-aff-empty { color: #6b7280; }

.telo-aff-frontend .telo-aff-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #eee;
}
.telo-aff-frontend .telo-aff-th,
.telo-aff-frontend .telo-aff-td {
  padding: 8px 10px;
  border-bottom: 1px solid #f3f3f3;
  vertical-align: top;
}
.telo-aff-frontend .telo-aff-th { 
  border-bottom: 1px solid #eee;
  text-align: left;
  font-weight: 600;
}
.telo-aff-frontend .telo-aff-th--right { text-align: right; }
.telo-aff-frontend .telo-aff-td--num   { text-align: right; }

/* ====== Solicitudes de cobro (admin) ====== */
.telo-aff-admin.telo-aff-req .telo-req-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.telo-aff-admin.telo-aff-req .telo-req-table {
  min-width: 920px;
}

.telo-aff-admin.telo-aff-req .telo-req-num { text-align: right; }
.telo-aff-admin.telo-aff-req .telo-req-email {
  max-width: 260px;
  word-break: break-word;
}

/* Columna Pedidos: resumen plegable y chips */
.telo-aff-admin.telo-aff-req .telo-req-orders summary {
  cursor: pointer;
  list-style: none;
}
.telo-aff-admin.telo-aff-req .telo-req-orders summary::-webkit-details-marker { display: none; }
.telo-aff-admin.telo-aff-req .telo-req-orders summary {
  color: #1d4ed8;
  text-decoration: underline;
}
.telo-aff-admin.telo-aff-req .telo-req-orders-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.telo-aff-admin.telo-aff-req .telo-req-order {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  text-decoration: none;
  line-height: 1.5;
}
.telo-aff-admin.telo-aff-req .telo-req-order:hover { background: #f3f4f6; }

/* Form de acciones compacto y flexible */
.telo-aff-admin.telo-aff-req .telo-req-actions {
  display: grid;
  gap: 6px;
  align-items: start;
}
.telo-aff-admin.telo-aff-req .telo-req-note { min-width: 200px; width: 100%; }
.telo-aff-admin.telo-aff-req .telo-req-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.logos-card { width: 85px; display: flex; max-width: 100%; margin-bottom: 8px; }
.logos-card img { width: 100%; object-fit: cover; }

.poweredGrey { color: #bcbcbc; margin-bottom: -5px; margin-top: -8px; font-size: 10px; }

.tituloPanelDetalle {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

table.affiliates #pending {
  border-bottom: 1px solid #c3c4c7;
  font-size: 14px;
}

/* ===== Lite: bloqueos visuales ===== */
.telo-aff-locked .telo-aff-blurred {
  position: relative;
  min-height: 380px;
  border: 1px dashed #ccd0d4;
  margin-top: 16px;
  filter: blur(3px);
  background: #f6f7f7;
  pointer-events: none; /* NUEVO: bloquea clics */
  display: none;
}
.telo-aff-locked .telo-aff-blurred::after { /* NUEVO: overlay tapa-interacciones */
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.35);
}

.telo-aff-upgrade-wrap { margin-top: 16px; }
.telo-aff-upgrade-box {
  background: #fff;
  border: 1px solid #ccd0d4;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

.telo-aff-promos {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0,1fr));
}
.telo-aff-promos img {
  width: 100%; height: auto; display: block; border-radius: 4px; border: 1px solid #e2e4e7;
}

/* Breakpoints del admin de WP (~782px) */
@media (max-width: 900px) {
  .telo-aff-admin.telo-aff-req .telo-req-table { min-width: 760px; }
}
@media (max-width: 782px) {
  .telo-aff-admin.telo-aff-req .telo-req-table { min-width: 640px; }
}

/* Responsive: stacked rows */
@media (max-width: 720px) {
  .telo-aff-frontend .telo-aff-table thead { display: none; }
  .telo-aff-frontend .telo-aff-table,
  .telo-aff-frontend .telo-aff-tbody,
  .telo-aff-frontend .telo-aff-tr,
  .telo-aff-frontend .telo-aff-td {
    display: block;
    width: 100%;
  }
  .telo-aff-frontend .telo-aff-tr {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
  }
  .telo-aff-frontend .telo-aff-td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
  }
  .telo-aff-frontend .telo-aff-td:last-child { border-bottom: 0; }
  .telo-aff-frontend .telo-aff-td::before {
    content: attr(data-label);
    font-weight: 600;
    flex: 0 0 48%;
    min-width: 140px;
    color: #374151;
    text-align: left;
  }
  .telo-aff-frontend .telo-aff-td--num { text-align: right; }
  .tituloPanelDetalle { flex-direction: column; }
}

@media screen and (max-width: 600px) {
  .telo-affiliate-form-add-affiliate { flex-direction: column; margin-bottom: 5px; }
  .telo-affiliate-form-add-affiliate p { margin-bottom: 0; }
  .telo-aff-new-affiliate-header-full { flex-direction: column; }
  .telo-col-afiliados-panel { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .historial-pagos-shortcode { max-width: 100%; display: flex; flex-direction: column; }
}
