/* --- COMPACT MODERN FEED SETTINGS IMPROVEMENTS --- */

/* Main container - more compact */
.feed-settings-container {
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 12px rgba(18,158,217,0.06) !important;
  padding: 18px !important;
  border: 1px solid #e8eef5 !important;
  margin: 16px auto 24px !important;
  max-width: 900px !important;
  transition: box-shadow 0.18s !important;
}

.feed-settings-container h3 {
  font-size: 19px !important;
  color: #129ed9 !important;
  font-weight: 600 !important;
  text-align: center !important;
  margin-bottom: 12px !important;
  letter-spacing: 0.1px !important;
}

/* Settings rows - more compact */
.settings-row {
  background: #fafbfd !important;
  border: 1px solid #e8eef5 !important;
  border-radius: 8px !important;
  padding: 10px !important;
  margin-bottom: 10px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

.settings-row.three-items > div {
  flex: 1 1 calc(33.33% - 10px) !important;
  min-width: 170px !important;
}

.settings-row.two-items > div {
  flex: 1 1 calc(50% - 10px) !important;
  min-width: 190px !important;
}

.settings-row.unified-checkbox-group {
  background: #fff !important;
  border: 1px solid #e8eef5 !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 4px rgba(18,158,217,0.03) !important;
  padding: 12px 10px !important;
}

/* Field groups - more compact */
.field-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

.field-group label {
  font-weight: 500 !important;
  color: #455a74 !important;
  font-size: 12px !important;
  position: relative !important;
}

.field-group label.tooltip .tooltiptext {
  min-width: 180px !important;
  background: white !important;
  color: #455a74 !important;
  border: 1px solid #e3e8ee !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
  border-radius: 5px !important;
  font-weight: normal !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
  padding: 6px 8px !important;
  z-index: 100 !important;
}

.field-group select,
.field-group input[type="text"] {
  padding: 7px 9px !important;
  border-radius: 5px !important;
  border: 1px solid #d1d9e6 !important;
  background: #fff !important;
  font-size: 12px !important;
  color: #333 !important;
  transition: all 0.15s !important;
}

.field-group select:focus,
.field-group input[type="text"]:focus {
  border-color: #129ed9 !important;
  box-shadow: 0 0 0 2px rgba(18,158,217,0.08) !important;
  outline: none !important;
}

.field-group input[type="checkbox"] {
  width: 13px !important;
  height: 13px !important;
  margin-top: 3px !important;
  accent-color: #129ed9 !important;
  cursor: pointer !important;
}

/* --- SPECIAL 24H SYNC TOGGLE SECTION --- */
.sync-toggle-section {
  background: linear-gradient(135deg, #f0f7fa 0%, #e6f3f8 100%) !important;
  border: 1.5px solid #129ed9 !important;
  border-radius: 10px !important;
  padding: 14px !important;
  margin: 14px 0 !important;
  position: relative !important;
  box-shadow: 0 2px 8px rgba(18,158,217,0.1) !important;
}

.sync-toggle-section::before {
  content: "⚡" !important;
  position: absolute !important;
  top: -10px !important;
  left: 14px !important;
  background: #129ed9 !important;
  color: white !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 10px !important;
  font-weight: bold !important;
}

.sync-toggle-section .field-group {
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
}

.sync-toggle-section .field-group label {
  font-weight: 600 !important;
  color: #129ed9 !important;
  font-size: 13px !important;
  margin: 0 !important;
  flex: 1 !important;
}

.sync-toggle-section .field-group input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  transform: scale(1.1) !important;
}

.sync-toggle-section .field-group .tooltiptext {
  background: #129ed9 !important;
  color: white !important;
  border: none !important;
  font-size: 11px !important;
  padding: 5px 7px !important;
}

/* --- COMPACT VARIANT TOGGLES --- */
.unified-checkbox-group .field-group {
  flex-direction: row !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 5px 7px !important;
  border-radius: 5px !important;
  transition: background-color 0.15s !important;
}

.unified-checkbox-group .field-group:hover {
  background: #f8fafc !important;
}

.unified-checkbox-group .field-group label {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #556987 !important;
  margin: 0 !important;
  flex: 1 !important;
  cursor: pointer !important;
}

.unified-checkbox-group .field-group input[type="checkbox"] {
  width: 12px !important;
  height: 12px !important;
  margin: 0 !important;
  order: -1 !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .feed-settings-container {
    padding: 12px !important;
    margin-left: 8px !important;
    margin-right: 8px !important;
  }
  
  .settings-row {
    padding: 8px !important;
  }
  
  .settings-row.three-items > div,
  .settings-row.two-items > div {
    flex: 1 1 100% !important;
  }
  
  .sync-toggle-section {
    padding: 10px !important;
  }
  
  .sync-toggle-section::before {
    left: 10px !important;
  }
}

/* --- MERCHANT CENTER OVERVIEW STYLES --- */
.merchant-overview-container {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
}

.merchant-overview-content {
  display: grid;
  gap: 16px;
}

.merchant-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.merchant-stat-card {
  background: #fafbfd;
  border: 1px solid #e8eef5;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  transition: all 0.2s ease;
}

.merchant-stat-card:hover {
  border-color: #129ed9;
  box-shadow: 0 2px 8px rgba(18, 158, 217, 0.1);
}

.merchant-stat-value {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 4px 0;
}

.merchant-stat-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.merchant-status-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.status-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  text-align: center;
  min-width: 80px;
  transition: all 0.2s ease;
}

.status-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Status-specific colors - more subtle */
.status-item.status-approved {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.status-item.status-pending {
  background: #fffbeb;
  border-color: #fed7aa;
  color: #92400e;
}

.status-item.status-disapproved {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.status-item.status-expiring {
  background: #fef3c7;
  border-color: #fde68a;
  color: #d97706;
}

.status-count {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.status-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.merchant-errors-section {
  background: #fafbfd;
  border: 1px solid #e8eef5;
  border-radius: 6px;
  padding: 12px;
  margin-top: 12px;
}

.merchant-errors-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.merchant-errors-title::before {
  content: "⚠️";
  font-size: 12px;
}

.merchant-error-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.merchant-error-item {
  padding: 4px 0;
  font-size: 12px;
  color: #6b7280;
  border-bottom: 1px solid #f1f5f9;
}

.merchant-error-item:last-child {
  border-bottom: none;
}

/* Loading and error states */
.merchant-overview-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #6b7280;
  font-size: 14px;
  gap: 10px;
}

.minimal-loader {
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #129ed9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.merchant-overview-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 12px;
  color: #b91c1c;
  font-size: 14px;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .merchant-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
  }
  
  .merchant-stat-card {
    padding: 10px;
  }
  
  .merchant-stat-value {
    font-size: 16px;
  }
  
  .status-item {
    min-width: 70px;
    padding: 6px 8px;
  }
}

.hidden {
  display: none !important;
}

/* --- FIELD MAPPING STYLES --- */
.mapping-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  margin: 20px 0;
}

.mapping-section {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
}

.mapping-header h4 {
  color: #129ed9;
  margin: 0 0 10px 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mapping-subtitle {
  color: #6c757d;
  font-size: 14px;
  margin: 0 0 15px 0;
}

.metafields-info {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 15px;
  min-height: 100px;
}

.mappings-container {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 15px;
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
}

.mapping-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f1f3f4;
  gap: 15px;
}

.mapping-row:last-child {
  border-bottom: none;
}

.metafield-name {
  flex: 1;
  font-weight: 500;
  color: #495057;
  background: #e3f2fd;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #bbdefb;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 13px;
}

.mapping-arrow {
  color: #129ed9;
  font-weight: bold;
  font-size: 16px;
}

.mapping-select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: white;
  font-size: 14px;
}

.mapping-select:focus {
  outline: none;
  border-color: #129ed9;
  box-shadow: 0 0 0 2px rgba(18, 158, 217, 0.2);
}

.mapping-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: flex-end;
}

.btn-primary, .btn-secondary {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: #129ed9;
  color: white;
}

.btn-primary:hover {
  background: #0e8bc2;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #545b62;
  transform: translateY(-1px);
}

.custom-field-count {
  color: #129ed9;
  font-weight: 600;
  background: #e3f2fd;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  display: inline-block;
  margin-top: 5px;
}

.no-custom-fields {
  text-align: center;
  color: #6c757d;
  font-style: italic;
  padding: 30px;
}

@media (max-width: 768px) {
  .mapping-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
} 