/**
 * HotZAP Redesign - Componentes Específicos
 * Complementa o CSS principal com estilos para componentes específicos do sistema
 */

/* ===== PRODUCT ICONS ===== */
.product-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--hz-radius-md);
  background: var(--hz-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--hz-green);
  flex-shrink: 0;
  transition: all var(--hz-transition-fast);
}

.product-icon:hover {
  background: var(--hz-green);
  color: var(--hz-text-inverse);
}

/* ===== PLATFORM ICONS ===== */
.platform-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--hz-radius-md);
  background: var(--hz-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--hz-green);
  flex-shrink: 0;
}

/* ===== ACTION BUTTONS GROUP ===== */
.action-buttons {
  display: flex;
  gap: var(--hz-space-xs);
  flex-wrap: wrap;
}

.action-buttons .btn {
  padding: var(--hz-space-xs) var(--hz-space-sm);
  min-width: 32px;
  height: 32px;
}

.action-buttons .btn i {
  font-size: 0.9rem;
}

/* ===== WEBHOOK URL BOX ===== */
.webhook-container {
  position: relative;
}

.webhook-url {
  background: var(--hz-bg-tertiary);
  padding: var(--hz-space-md);
  border-radius: var(--hz-radius-md);
  font-family: var(--hz-font-mono);
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--hz-text-secondary);
  border: 1px solid var(--hz-border-color);
  transition: all var(--hz-transition-fast);
}

.webhook-url:hover {
  border-color: var(--hz-green);
  background: var(--hz-green-light);
}

/* ===== COPY BUTTON ===== */
.copy-btn {
  position: absolute;
  top: var(--hz-space-sm);
  right: var(--hz-space-sm);
  padding: var(--hz-space-xs) var(--hz-space-sm);
  background: var(--hz-bg-secondary);
  border: 1px solid var(--hz-border-color);
  border-radius: var(--hz-radius-sm);
  color: var(--hz-text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--hz-transition-fast);
}

.copy-btn:hover {
  background: var(--hz-green);
  border-color: var(--hz-green);
  color: var(--hz-text-inverse);
}

.copy-btn.copied {
  background: var(--hz-success);
  border-color: var(--hz-success);
  color: var(--hz-text-inverse);
}

/* ===== TOKEN INPUT ===== */
.token-input-container {
  position: relative;
}

.token-input-container input {
  padding-right: 44px;
}

.toggle-password,
.toggle-api-secret {
  position: absolute;
  right: var(--hz-space-sm);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--hz-text-tertiary);
  cursor: pointer;
  padding: var(--hz-space-xs);
  border-radius: var(--hz-radius-sm);
  transition: all var(--hz-transition-fast);
}

.toggle-password:hover,
.toggle-api-secret:hover {
  color: var(--hz-green);
  background: var(--hz-green-light);
}

/* ===== API CONFIG FIELDS ===== */
.api-config-btn {
  background: none;
  border: none;
  color: var(--hz-green);
  font-size: 0.8rem;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
  transition: color var(--hz-transition-fast);
}

.api-config-btn:hover {
  color: var(--hz-green-dark);
}

.api-config-fields {
  margin-top: var(--hz-space-md);
  padding: var(--hz-space-md);
  background: var(--hz-bg-tertiary);
  border-radius: var(--hz-radius-md);
  border-left: 4px solid var(--hz-green);
  animation: slideDown 0.3s ease-out;
}

.api-config-fields.hiding {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  to {
    opacity: 1;
    max-height: 400px;
    padding-top: var(--hz-space-md);
    padding-bottom: var(--hz-space-md);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    max-height: 400px;
  }
  to {
    opacity: 0;
    max-height: 0;
  }
}

/* ===== NOTIFICATIONS ===== */
.notifications-dashboard {
  display: flex;
  flex-direction: column;
  gap: var(--hz-space-md);
  margin-bottom: var(--hz-space-xl);
}

.notification-item {
  display: flex;
  gap: var(--hz-space-md);
  background: var(--hz-bg-secondary);
  border: 1px solid var(--hz-border-color);
  border-radius: var(--hz-radius-lg);
  padding: var(--hz-space-lg);
  transition: all var(--hz-transition-normal);
}

.notification-item:hover {
  box-shadow: var(--hz-shadow-md);
  transform: translateY(-2px);
}

.notification-item.is-unread {
  background: var(--hz-green-light);
  border-color: var(--hz-green);
}

.notification-item.is-read {
  opacity: 0.8;
}

.notification-indicator {
  width: 4px;
  min-height: 100%;
  border-radius: 4px;
  flex-shrink: 0;
}

.notification-indicator.unread {
  background: linear-gradient(180deg, var(--hz-green) 0%, var(--hz-green-dark) 100%);
}

.notification-indicator.read {
  background: var(--hz-border-color);
}

.notification-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--hz-space-sm);
  min-width: 0;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--hz-space-md);
  flex-wrap: wrap;
}

.notification-title-row {
  display: flex;
  align-items: center;
  gap: var(--hz-space-sm);
  flex-wrap: wrap;
}

.notification-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--hz-text-primary);
  margin: 0;
}

.notification-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: var(--hz-space-xs) var(--hz-space-sm);
  border-radius: var(--hz-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notification-badge.badge-unread {
  background: var(--hz-green);
  color: var(--hz-text-inverse);
  animation: pulse 2s infinite;
}

.notification-badge.badge-read {
  background: var(--hz-bg-tertiary);
  color: var(--hz-text-tertiary);
}

.notification-meta {
  display: flex;
  align-items: center;
  gap: var(--hz-space-sm);
}

.notification-date {
  font-size: 0.8rem;
  color: var(--hz-text-tertiary);
  display: flex;
  align-items: center;
  gap: var(--hz-space-xs);
  white-space: nowrap;
}

.notification-close {
  background: transparent;
  border: none;
  color: var(--hz-text-tertiary);
  cursor: pointer;
  padding: var(--hz-space-xs);
  border-radius: var(--hz-radius-sm);
  transition: all var(--hz-transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-close:hover {
  background: var(--hz-error-bg);
  color: var(--hz-error);
}

.notification-body {
  font-size: 0.9rem;
  color: var(--hz-text-secondary);
  line-height: 1.6;
  white-space: pre-line;
}

.notification-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hz-space-md);
  padding-top: var(--hz-space-sm);
  border-top: 1px solid var(--hz-border-light);
  margin-top: var(--hz-space-xs);
}

.btn-mark-read {
  display: inline-flex;
  align-items: center;
  gap: var(--hz-space-xs);
  padding: var(--hz-space-sm) var(--hz-space-md);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--hz-green);
  background: transparent;
  border: 1px solid var(--hz-green);
  border-radius: var(--hz-radius-md);
  cursor: pointer;
  transition: all var(--hz-transition-fast);
}

.btn-mark-read:hover:not(:disabled) {
  background: var(--hz-green);
  color: var(--hz-text-inverse);
}

.btn-mark-read:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--hz-border-color);
  color: var(--hz-text-tertiary);
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: var(--hz-space-xs);
  font-size: 0.8rem;
  color: var(--hz-text-tertiary);
  text-decoration: none;
  transition: all var(--hz-transition-fast);
}

.btn-view-all:hover {
  color: var(--hz-green);
}

.btn-view-all i {
  transition: transform var(--hz-transition-fast);
}

.btn-view-all:hover i {
  transform: translateX(3px);
}

/* ===== DASHBOARD PERIOD FILTER ===== */
.dashboard-period-filter {
  display: flex;
  align-items: center;
  gap: var(--hz-space-sm);
  flex-wrap: wrap;
  margin-top: var(--hz-space-md);
}

.dashboard-period-filter__label {
  color: var(--hz-text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
}

.dashboard-period-filter__options {
  display: flex;
  gap: var(--hz-space-sm);
  flex-wrap: wrap;
}

.dashboard-period-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: var(--hz-space-sm) var(--hz-space-md);
  border-radius: var(--hz-radius-full);
  border: 1px solid var(--hz-border-color);
  background: var(--hz-bg-secondary);
  color: var(--hz-text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--hz-transition-fast);
}

.dashboard-period-chip:hover {
  border-color: var(--hz-green);
  color: var(--hz-green);
}

.dashboard-period-chip.is-active {
  background: var(--hz-green);
  border-color: var(--hz-green);
  color: var(--hz-text-inverse);
}

/* ===== TIPS/HELP CARDS ===== */
.tips-card {
  background: linear-gradient(135deg, var(--hz-green-light) 0%, var(--hz-bg-secondary) 100%);
  border: 1px solid var(--hz-green);
  border-radius: var(--hz-radius-lg);
  padding: var(--hz-space-lg);
  margin-top: var(--hz-space-xl);
}

[data-theme="dark"] .tips-card {
  background: linear-gradient(135deg, var(--hz-green-light) 0%, var(--hz-bg-tertiary) 100%);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--hz-space-md);
  margin-top: var(--hz-space-md);
}

.tip-item {
  padding: var(--hz-space-md);
  background: var(--hz-bg-secondary);
  border-radius: var(--hz-radius-md);
  transition: all var(--hz-transition-fast);
}

.tip-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--hz-shadow-sm);
}

.tip-item h5 {
  color: var(--hz-green-dark);
  margin-bottom: var(--hz-space-sm);
  font-size: 0.9rem;
}

.tip-item p {
  font-size: 0.85rem;
  color: var(--hz-text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* ===== FAQ SECTION ===== */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--hz-space-lg);
}

.faq-item {
  padding: var(--hz-space-lg);
  background: var(--hz-bg-tertiary);
  border-radius: var(--hz-radius-md);
  transition: all var(--hz-transition-fast);
}

.faq-item:hover {
  background: var(--hz-green-light);
}

.faq-item h5 {
  color: var(--hz-text-primary);
  margin-bottom: var(--hz-space-sm);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: var(--hz-space-sm);
}

.faq-item h5 i {
  color: var(--hz-green);
}

.faq-item p {
  font-size: 0.875rem;
  color: var(--hz-text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: var(--hz-space-2xl);
}

.empty-state-icon {
  font-size: 4rem;
  color: var(--hz-text-tertiary);
  opacity: 0.3;
  margin-bottom: var(--hz-space-lg);
}

.empty-state h3 {
  color: var(--hz-text-primary);
  margin-bottom: var(--hz-space-sm);
}

.empty-state p {
  color: var(--hz-text-secondary);
  margin-bottom: var(--hz-space-lg);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== SEARCH INPUT ===== */
[data-search] {
  padding-left: var(--hz-space-xl);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235E6368' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: var(--hz-space-sm) center;
}

/* ===== COPY JS BUTTONS ===== */
.copy-js-group {
  display: flex;
  gap: var(--hz-space-sm);
  margin-top: var(--hz-space-sm);
  flex-wrap: wrap;
}

.copy-js-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--hz-space-xs);
  padding: var(--hz-space-xs) var(--hz-space-sm);
  font-size: 0.75rem;
  background: var(--hz-bg-tertiary);
  border: 1px solid var(--hz-border-color);
  border-radius: var(--hz-radius-sm);
  color: var(--hz-text-secondary);
  cursor: pointer;
  transition: all var(--hz-transition-fast);
}

.copy-js-btn:hover {
  background: var(--hz-green-light);
  border-color: var(--hz-green);
  color: var(--hz-green);
}

.copy-js-note {
  display: inline-flex;
  align-items: center;
  color: var(--hz-text-tertiary);
  font-size: 0.8rem;
}

/* ===== CHARTS CONTAINER ===== */
.chart-container {
  background: var(--hz-bg-secondary);
  border: 1px solid var(--hz-border-color);
  border-radius: var(--hz-radius-lg);
  padding: var(--hz-space-lg);
  margin-bottom: var(--hz-space-lg);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--hz-space-lg);
  flex-wrap: wrap;
  gap: var(--hz-space-md);
}

.chart-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--hz-text-primary);
}

/* ===== LOADING STATES ===== */
.skeleton {
  background: linear-gradient(90deg, var(--hz-bg-tertiary) 25%, var(--hz-border-color) 50%, var(--hz-bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--hz-radius-sm);
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: var(--hz-space-sm);
}

.skeleton-title {
  height: 1.5rem;
  width: 60%;
  margin-bottom: var(--hz-space-md);
}

.skeleton-card {
  height: 120px;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  .notification-item {
    padding: var(--hz-space-md);
  }

  .notification-header {
    flex-direction: column;
    gap: var(--hz-space-sm);
  }

  .notification-meta {
    width: 100%;
    justify-content: space-between;
  }

  .notification-actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--hz-space-sm);
  }

  .btn-mark-read {
    justify-content: center;
  }

  .btn-view-all {
    justify-content: center;
    padding: var(--hz-space-sm);
    background: var(--hz-bg-tertiary);
    border-radius: var(--hz-radius-md);
  }

  .dashboard-period-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-period-filter__options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-period-chip {
    width: 100%;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .action-buttons {
    width: 100%;
  }

  .action-buttons .btn {
    flex: 1;
    min-width: 40px;
  }
}
