/* Communications Hub Banner & Wizard Styles */

/* Banner Card */
.comms-hub-banner {
  background: var(--background-paper);
  border: 2px solid var(--harmoniq-primary);
  border-radius: var(--border-radius-small);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.comms-hub-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--harmoniq-primary), var(--harmoniq-secondary));
}

.comms-hub-banner-header {
  margin-bottom: 20px;
}

.comms-hub-banner-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.comms-hub-icon {
  font-size: 28px;
  color: var(--harmoniq-primary);
}

.comms-hub-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.comms-hub-badge {
  background: var(--harmoniq-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.comms-hub-badge-pro {
  background: var(--harmoniq-secondary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.comms-hub-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* Channel Tiles Grid */
.comms-hub-channels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .comms-hub-channels {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .comms-hub-channels {
    grid-template-columns: repeat(2, 1fr);
  }
}

.comms-hub-channel-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  background: var(--background-default);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-small);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.comms-hub-channel-tile:hover {
  border-color: var(--harmoniq-primary);
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.15);
  transform: translateY(-1px);
}

.comms-hub-channel-tile.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.comms-hub-channel-tile .material-icons {
  font-size: 28px;
  color: var(--harmoniq-primary);
}

.channel-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
}

/* Status Dots */
.channel-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #bbb;
  position: absolute;
  top: 8px;
  right: 8px;
}

.channel-status-dot.enabled {
  background: #4caf50;
}

.channel-status-dot.configured {
  background: #ff9800;
}

.channel-status-dot.disabled {
  background: #bbb;
}

/* Actions */
.comms-hub-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.comms-hub-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--harmoniq-primary);
  color: #fff;
  border: none;
  border-radius: var(--border-radius-small);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.comms-hub-btn-primary:hover {
  background: var(--harmoniq-secondary);
}

.comms-hub-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.comms-hub-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: transparent;
  color: var(--harmoniq-primary);
  border: 1px solid var(--harmoniq-primary);
  border-radius: var(--border-radius-small);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comms-hub-btn-secondary:hover {
  background: rgba(39, 76, 119, 0.05);
}

.comms-hub-status-text {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Wizard Modal */
.comms-hub-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comms-hub-modal {
  background: var(--background-paper);
  border-radius: var(--border-radius-small);
  box-shadow: var(--shadow-lg);
  width: 95%;
  max-width: 900px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.comms-hub-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.comms-hub-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.comms-hub-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.comms-hub-modal-close:hover {
  color: var(--text-primary);
}

.comms-hub-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Wizard Steps */
.wizard-step {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.wizard-step:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.wizard-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--harmoniq-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  margin-right: 10px;
}

.wizard-step-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.wizard-step-instructions {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.wizard-step-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--harmoniq-primary);
  text-decoration: none;
}

.wizard-step-link:hover {
  text-decoration: underline;
}

.wizard-scopes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.wizard-scope-tag {
  background: var(--background-default);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-family: monospace;
  color: var(--text-secondary);
}

/* Webhook URL Copy Box */
.webhook-url-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--background-default);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-small);
  padding: 8px 12px;
  margin: 10px 0;
}

.webhook-url-box code {
  flex: 1;
  font-size: 12px;
  color: var(--text-primary);
  word-break: break-all;
}

.webhook-url-box .copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--harmoniq-primary);
  padding: 4px;
  font-size: 18px;
}

.webhook-url-box .copy-btn:hover {
  color: var(--harmoniq-secondary);
}

.webhook-url-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.webhook-url-where {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 4px;
}

/* Credential Form */
.credential-form {
  margin-top: 16px;
}

.credential-field {
  margin-bottom: 16px;
}

.credential-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.credential-field label .required-star {
  color: #e53935;
}

.credential-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.credential-input-wrapper input {
  padding-right: 40px;
}

.credential-toggle-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  display: flex;
  align-items: center;
}

.credential-toggle-btn:hover {
  color: var(--harmoniq-primary);
}

.credential-toggle-btn .material-icons {
  font-size: 18px;
}

.credential-field input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-small);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--background-default);
  box-sizing: border-box;
}

.credential-field input:focus {
  outline: none;
  border-color: var(--harmoniq-primary);
  box-shadow: 0 0 0 2px rgba(39, 76, 119, 0.15);
}

.credential-field .field-help {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

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

/* Loading State */
.comms-hub-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.comms-hub-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--harmoniq-primary);
  border-radius: 50%;
  animation: comms-hub-spin 0.8s linear infinite;
}

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