/* ==========================================
   CLIENT HUB WRAPPER
========================================== */
.clientes-hub-wrapper {
  padding: 12px;
}

/* ==========================================
   HUB HEADER
========================================== */
.clientes-hub-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.clientes-hub-back {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #374151;
}

.clientes-hub-info {
  flex: 1;
}

.clientes-hub-info h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.clientes-hub-info small {
  font-size: 12px;
  color: #6b7280;
}

/* ==========================================
   HUB TABS
========================================== */
.clientes-hub-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 12px;
}

.hub-tab {
  flex: 1;
  padding: 8px;
  font-size: 13px;
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
}

.hub-tab.active {
  border-bottom: 2px solid #2563eb;
  color: #2563eb;
  font-weight: 600;
}

/* ==========================================
   HUB CONTENT
========================================== */
.clientes-hub-content {
  padding-bottom: 20px;
}

.hub-section {
  display: none;
}

.hub-section.active {
  display: block;
}

/* ==========================================
   HUB CARDS
========================================== */
.hub-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  font-size: 14px;
}

/* ==========================================
   PHOTOS GRID
========================================== */
#hubPhotosGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.hub-photo-item {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.hub-photo-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

/* ==========================================
   POOLS LIST
========================================== */
#hubPoolsList {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub-pool-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  cursor: pointer;
}

.hub-pool-card:hover {
  background: #f9fafb;
}

.hub-pool-title {
  font-weight: 600;
  font-size: 14px;
}

.hub-pool-sub {
  font-size: 12px;
  color: #6b7280;
}

/* STATUS BADGE */
.clientes-status-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 20px;
  margin-top: 8px;
  font-weight: 500;
}

.clientes-status-badge.active {
  background: #dcfce7;
  color: #166534;
}

.clientes-status-badge.inactive {
  background: #fee2e2;
  color: #991b1b;
}

/* =========================
   HUB CARD COLLAPSIBLE
========================= */

.hub-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 14px;
  background: #ffffff;
}

.hub-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
}

.hub-card-title {
  display: flex;
  flex-direction: column;
}

.hub-card-title h3 {
  font-size: 15px;
  margin: 0;
}

.hub-card-preview {
  font-size: 12px;
  color: #6b7280;
}

.hub-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-card-body {
  padding: 16px;
  border-top: 1px solid #f3f4f6;
}

.hub-card-body.collapsed {
  display: none;
}

.hub-status-switch {
  margin-right: 8px;
}

.service-location-list {
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 8px 12px;
}

.service-location-list.collapsed {
  display: none;
}

.service-location-item {
  padding: 6px 4px;
  cursor: pointer;
  font-size: 13px;
}

.service-location-item:hover {
  background: #e5e7eb;
  border-radius: 4px;
}

.service-location-add {
  margin-top: 6px;
  font-weight: 600;
  cursor: pointer;
  color: #2563eb;
}

/* ==========================================
   SERVICE ADDRESS TYPE SELECT
========================================== */

.service-tipo-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.service-tipo-select {
  flex: 1;
}

.service-tipo-manage-btn {
  padding: 6px 10px;
}

.service-activo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-activo-row .clientes-switch-label {
  font-weight: 500;
}

.service-location-item.inactive {
  opacity: 0.6;
}

.service-inactive-badge {
  background: #f9cc38;
  color: #000000;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 12px;
  margin-right: 6px;
}

.service-location-item.inactive {
  opacity: 0.6;
  font-style: italic;
}
/* ==========================================
   PHONE CONTACTS
========================================== */

/* ===== ROW BASE ===== */

.phone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  flex-wrap: nowrap;
}

/* ===== VIEW MODE ===== */

.phone-view-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.phone-type-label {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  flex-shrink: 0;
}

.phone-number-label {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-view-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.phone-icon-btn {
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.phone-icon-btn:hover {
  transform: scale(1.1);
}

/* Icon Colors */

.phone-icon-btn .bi-telephone {
  color: #2563eb; /* Call - Blue */
}

.phone-icon-btn .bi-whatsapp {
  color: #25d366; /* WhatsApp Green */
}

.phone-icon-btn .bi-chat-dots {
  color: #374151; /* SMS Gray */
}

/* ===== EDIT & ADD MODE ===== */

.phone-type-btn {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  min-width: 90px;
  text-align: left;
}

.phone-type-btn:hover {
  background: #e5e7eb;
}

.phone-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
}

.phone-input:disabled {
  background: #f9fafb;
  border: 1px solid transparent;
}

.phone-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: #dc2626;
  font-size: 16px;
}

.phone-delete:hover {
  opacity: 0.7;
}

/* ===== ADD MULTIPLE ROW ===== */

.phone-add-row {
  margin-top: 10px;
}

.phone-add-btn {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font-weight: 500;
}

.phone-select {
  min-width: 130px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
}

.edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-select {
  width: 90px;
  flex-shrink: 0;
}

.phone-input {
  flex: 1;
  min-width: 0;
}

.phone-delete {
  flex-shrink: 0;
}

/* ==========================================
EMAIL CONTACTS
========================================== */

.clientes-mail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.clientes-mail-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.clientes-mail-type {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

.clientes-mail-value {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clientes-mail-star {
  color: #2563eb;
  font-size: 14px;
  margin-left: 6px;
}

.clientes-mail-primary-checkbox {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

/* ==========================================
EMAIL CONTACTS · EDIT MODE
========================================== */

.clientes-mail-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.clientes-mail-select {
  width: 95px;
  flex-shrink: 0;
}

.clientes-mail-input {
  flex: 1;
  min-width: 0;
}

.clientes-mail-star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  transition: 0.2s;
  color: #facc15; /* gris cuando vacío */
}

.clientes-mail-star-btn:hover {
  transform: scale(1.15);
}

.clientes-mail-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.clientes-mail-icon-btn {
  font-size: 16px;
  text-decoration: none;
  color: #2563eb;
  transition: 0.15s ease;
}

.clientes-mail-icon-btn:hover {
  transform: scale(1.1);
}
