/* Ohio GOP Brand Theme */
/* Primary Red: #d51b28 | Dark Red: #b00511 | Dark Gray: #3a3a3a */
/* Fonts: Poppins (headings), Plus Jakarta Sans (body) */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: transparent;
  color: #2c2c2c;
  line-height: 1.6;
  font-size: 17px;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 20px 16px;
}

h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: #2c2c2c;
  margin-bottom: 4px;
}

h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: #fff;
}

.subtitle {
  color: #6b6b6b;
  margin-bottom: 24px;
}

/* Form */
form {
  background: #fff;
  padding: 32px 28px 28px;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  margin-bottom: 16px;
}

.form-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: #d51b28;
  margin: 0 0 4px;
  text-align: center;
}

.form-subtitle {
  color: #3a3a3a;
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 20px;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #2c2c2c;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.form-group input:focus {
  outline: none;
  border-color: #d51b28;
  box-shadow: 0 0 0 3px rgba(213, 27, 40, 0.15);
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

button[type="submit"] {
  background: #d51b28;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s;
}

button[type="submit"]:hover {
  background: #b00511;
}

button[type="submit"]:disabled {
  background: #e8a0a5;
  cursor: not-allowed;
}

.loading {
  text-align: center;
  padding: 24px;
  color: #6b6b6b;
  font-style: italic;
}

.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.hidden {
  display: none;
}

/* Results panel */
#results h2 {
  margin-bottom: 4px;
}

.matched-address {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

#district-cards {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Section headers */
.section-header {
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: #3a3a3a;
  padding: 8px 20px;
}

/* Candidate rows */
.candidate-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
}

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

.candidate-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  flex-shrink: 0;
  overflow: hidden;
}

.candidate-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.candidate-info {
  margin-left: 14px;
  min-width: 0;
}

.candidate-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #2c2c2c;
}

.candidate-role {
  font-size: 0.8rem;
  color: #6b6b6b;
}

/* Candidate clickable link (photo + name) */
.candidate-link {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px;
  margin: -4px;
  transition: background 0.15s;
}

.candidate-link:hover {
  background: #f5f5f5;
}

.candidate-link:hover .candidate-name {
  color: #d51b28;
}

.candidate-link.no-link {
  cursor: default;
}

.candidate-link.no-link:hover {
  background: transparent;
}

.candidate-link.no-link:hover .candidate-name {
  color: #2c2c2c;
}

/* Social links */
.social-links {
  display: flex;
  gap: 10px;
  margin-left: 12px;
  flex-shrink: 0;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #6b6b6b;
  background: #f3f4f6;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

a.social-link:hover {
  background: #d51b28;
  color: #fff;
}

.social-link.disabled {
  color: #d1d5db;
  background: #f9fafb;
  cursor: default;
}

/* No candidate message */
.no-candidate {
  padding: 12px 20px;
  color: #999;
  font-style: italic;
  font-size: 0.85rem;
  border-bottom: 1px solid #f0f0f0;
}

/* Persistent share toolbar (above candidate list) */
.share-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 12px;
}

.share-toolbar-label {
  font-size: 0.8rem;
  color: #888;
  font-weight: 500;
  margin-right: 4px;
  white-space: nowrap;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #f5f5f5;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #555;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.toolbar-btn:hover {
  background: #ebebeb;
  color: #2c2c2c;
  border-color: #ccc;
}

/* Share popup overlay */
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.share-overlay.hidden {
  display: none;
}

.share-modal {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.share-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 0.85rem;
  color: #ccc;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  transition: color 0.15s;
}

.share-close:hover {
  color: #999;
}

.share-step h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: #2c2c2c;
}

.share-subtitle {
  color: #6b6b6b;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.share-field {
  margin-bottom: 4px;
}

.share-field label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: #2c2c2c;
  margin-bottom: 6px;
}

.share-input-row {
  display: flex;
  gap: 8px;
}

.share-input-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.share-input-row input:focus {
  outline: none;
  border-color: #d51b28;
  box-shadow: 0 0 0 3px rgba(213, 27, 40, 0.15);
}

.share-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: #bbb;
  font-size: 0.8rem;
}

.share-divider::before,
.share-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.share-action-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #6b6b6b;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.share-action-link:hover {
  background: #f5f5f5;
  border-color: #ccc;
  color: #2c2c2c;
}

.share-submit {
  background: #d51b28;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.share-submit:hover {
  background: #b00511;
}

.share-submit:disabled {
  background: #e8a0a5;
  cursor: not-allowed;
}

.share-back {
  background: none;
  border: none;
  color: #3a3a3a;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
}

.share-back:hover {
  text-decoration: underline;
}

.share-success-icon {
  text-align: center;
  margin-bottom: 12px;
}

.share-done {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  background: #d51b28;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}

.share-done:hover {
  background: #b00511;
}

.share-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-top: 12px;
}

.share-error.hidden {
  display: none;
}
