/* Job Description Templates Page Styles */

.templates-layout {
  max-width: 900px;
  margin: 0 auto;
}

/* Email Gate Standalone (full width) */
.email-gate-standalone {
  text-align: center;
  padding: 40px 32px;
  max-width: 560px;
  margin: 0 auto 48px;
}

.email-gate-standalone h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.email-gate-standalone > p {
  color: var(--muted);
  margin-bottom: 24px;
}

/* Templates Preview List */
.templates-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 28px;
  text-align: left;
}

@media (max-width: 480px) {
  .templates-preview {
    grid-template-columns: 1fr;
  }
}

.preview-item {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-item::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Templates Panel */
.templates-panel {
  max-width: 900px;
  margin: 0 auto;
}

.templates-header {
  text-align: center;
  margin-bottom: 32px;
}

.templates-header h2 {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.templates-header p {
  color: var(--muted);
}

/* Templates Grid */
.templates-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

/* Template Card */
.template-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.template-card:hover {
  border-color: var(--accent);
}

.template-card.expanded {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.template-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  transition: background 200ms ease;
}

.template-header:hover {
  background: var(--card-2);
}

.template-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.template-icon {
  color: var(--accent);
  display: flex;
  align-items: center;
}

.template-title h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.template-toggle {
  color: var(--muted);
  transition: transform 200ms ease;
  display: flex;
  align-items: center;
}

.template-card.expanded .template-toggle {
  transform: rotate(180deg);
}

/* Template Content */
.template-content {
  display: none;
  border-top: 1px solid var(--border);
  padding: 20px;
  background: var(--card-2);
}

.template-card.expanded .template-content {
  display: block;
}

.template-actions {
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.875rem;
}

.btn-sm svg {
  margin-right: 6px;
}

.btn.success {
  border-color: var(--success);
  color: var(--success);
}

/* Template Text */
.template-text {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
  color: var(--text);
  max-height: 500px;
  overflow-y: auto;
}

/* Templates CTA */
.templates-cta {
  text-align: center;
  padding: 40px 32px;
  background: linear-gradient(135deg, rgba(42, 125, 106, 0.06) 0%, rgba(61, 111, 168, 0.06) 100%);
  border-radius: var(--radius);
  margin-bottom: 48px;
}

.templates-cta h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.templates-cta p {
  color: var(--muted);
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .email-gate-standalone {
    padding: 28px 20px;
  }

  .template-header {
    padding: 14px 16px;
  }

  .template-title h3 {
    font-size: 0.95rem;
  }

  .template-content {
    padding: 16px;
  }

  .template-text {
    padding: 16px;
    font-size: 0.75rem;
  }

  .templates-cta {
    padding: 28px 20px;
  }
}
