/* app/assets/stylesheets/advertising.css */

/* ── Grid ─────────────────────────────────────── */
.ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 8px 0;
}

/* ── Page header: title + CTA row ─────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-header h1 {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.page-subtitle {
  margin: 6px 0 0;
  color: #8b949e;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Badge / pill ─────────────────────────────── */
.ad-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.ad-badge--muted {
  background: #21262d;
  color: #8b949e;
  border-color: #30363d;
}

/* ── Card header ──────────────────────────────── */
.ad-card-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ad-card-header strong {
  font-size: 15px;
  color: #e6edf3;
  font-weight: 600;
}

.ad-card-email {
  font-size: 13px;
  color: #8b949e;
}

/* ── Actions bar ──────────────────────────────── */
.actions-bar {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #21262d;
}

/* ── Empty state ──────────────────────────────── */
.ad-empty {
  color: #8b949e;
  font-size: 14px;
  font-style: italic;
  padding: 12px 0;
}

/* ── Triggers section ─────────────────────────── */
.triggers-section {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.triggers-section h2 {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ── Trigger row ──────────────────────────────── */
.triggers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trigger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1c2128;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 10px 14px;
  transition: border-color 0.15s ease;
}

.trigger-row:hover {
  border-color: #3b82f6;
}

/* ── Tag pill ─────────────────────────────────── */
.tag-pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

/* ── Add trigger form ─────────────────────────── */
.add-trigger-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ad-select {
  padding: 9px 12px;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: #e6edf3;
  font-size: 14px;
  flex: 1;
  max-width: 320px;
  transition: border-color 0.15s ease;
  cursor: pointer;
}

.ad-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ── New conversion action form card ──────────── */
.ad-form-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 28px;
  max-width: 480px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #8b949e;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.ad-input {
  width: 100%;
  padding: 10px 14px;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: #e6edf3;
  font-size: 15px;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.ad-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.ad-input::placeholder {
  color: #484f58;
}

.form-actions {
  margin-top: 8px;
}

/* ── Conversion type badge ────────────────────── */
.conversion-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
}

.conversion-type-badge svg {
  flex-shrink: 0;
}

/* ── Radio group ──────────────────────────────── */
.form-group-label {
  display: block;
  color: #8b949e;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.radio-option:has(input:checked) {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.06);
}

.radio-option input[type="radio"] {
  accent-color: #22c55e;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.radio-label {
  font-size: 14px;
  color: #e6edf3;
  font-weight: 500;
}
