/* Mobile Canvassing App Styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #ffffff;
  color: #333;
  font-size: 16px;
  line-height: 1.5;
}

.mobile-header {
  padding: 10px 20px;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

.mobile-logo {
  height: 40px;
  width: auto;
}

.mobile-content {
  padding: 20px;
}

/* Precinct List Styles */
.precinct-list {
  list-style: none;
}

.precinct-item {
  display: flex;
  align-items: center;
  padding: 15px;
  margin-bottom: 10px;
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.precinct-item:active {
  background-color: #e8e8e8;
}

.precinct-name {
  flex: 1;
  font-weight: 600;
  font-size: 18px;
  color: #333;
}

.precinct-stats {
  display: flex;
  gap: 8px;
  align-items: center;
}

.stat-pill {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  min-width: 50px;
  text-align: center;
}

.stat-pill.green {
  background-color: #4CAF50;
}

.stat-pill.yellow {
  background-color: #FFC107;
  color: #333;
}

.stat-pill.orange {
  background-color: #FF9800;
}

.stat-pill.black {
  background-color: #333333;
}

/* Page Title */
.page-title-row {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  flex: 1;
}

.back-button {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
}

/* Walking List - Street Selector */
.street-select {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  margin-bottom: 16px;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
}

/* Walking List - Address Groups */
.street-group {
  display: none;
}

.street-group.active {
  display: block;
}

.address-list {
  list-style: none;
}

.address-item {
  display: flex;
  align-items: center;
  padding: 15px;
  margin-bottom: 10px;
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.address-item:active {
  background-color: #e8e8e8;
}

.address-name {
  flex: 1;
  font-weight: 600;
  font-size: 16px;
  color: #333;
}

.address-stats {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Party letters */
.party-letters {
  font-weight: 700;
  font-size: 14px;
  color: #555;
  letter-spacing: 1px;
}

/* Contact status pills */
.stat-pill.status-no-contact {
  background-color: #9e9e9e;
}

.stat-pill.status-literature {
  background-color: #2196F3;
}

.stat-pill.status-contacted {
  background-color: #4CAF50;
}

.stat-pill.status-hot {
  background-color: #FF9800;
}

/* Donor score */
.donor-score {
  color: #8D6E63;
  font-weight: 700;
  font-size: 14px;
}

/* Notes indicator */
.has-notes {
  color: #F57C00;
  font-weight: 700;
  font-size: 16px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

/* Modal header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-address-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.modal-close {
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  color: #666;
  line-height: 1;
}

/* Contact status boxes */
.status-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.status-box {
  flex: 1;
  padding: 12px 4px;
  border-radius: 8px;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.status-box.selected {
  border-color: #fff;
  box-shadow: 0 0 0 3px #333;
}

.status-box.status-no-contact { background-color: #9e9e9e; }
.status-box.status-literature  { background-color: #2196F3; }
.status-box.status-contacted   { background-color: #4CAF50; }
.status-box.status-hot         { background-color: #FF9800; }

/* Sign toggle */
.sign-row {
  margin-bottom: 12px;
}

.sign-box {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  background-color: #e0e0e0;
  color: #333;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.sign-box.selected {
  background-color: #66BB6A;
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 3px #333;
}

/* Contact notes */
.notes-row {
  margin-bottom: 16px;
}

.notes-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
}

.notes-row textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

/* Contact cards */
.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-card {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.contact-card:active {
  background-color: #e8e8e8;
}

.contact-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.contact-name {
  font-weight: 700;
  font-size: 16px;
  color: #333;
}

.contact-age {
  font-size: 13px;
  color: #888;
}

.contact-details {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
  line-height: 1.6;
}

.contact-details span {
  margin-right: 8px;
  white-space: nowrap;
}

.contact-notes-preview {
  font-size: 12px;
  color: #999;
  font-style: italic;
  margin-top: 4px;
}

/* Expanded card */
.contact-card-expanded {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}

.contact-card.expanded .contact-card-expanded {
  display: block;
}

.contact-card-expanded label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
  margin-top: 10px;
}

.contact-card-expanded label:first-child {
  margin-top: 0;
}

.contact-card-expanded input[type="text"],
.contact-card-expanded textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.contact-card-expanded textarea {
  resize: vertical;
}

/* Toggle boxes (Contact / Volunteer) */
.toggle-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.toggle-box {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  background-color: #e0e0e0;
  color: #333;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.toggle-box.selected {
  background-color: #66BB6A;
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 3px #333;
}

/* Admin Launch Page */
.admin-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.admin-button {
  display: block;
  padding: 20px;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  background-color: #333;
  color: #fff;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.admin-button:active {
  background-color: #555;
}

/* Search Form */
.search-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.search-input {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #fff;
  font-family: inherit;
  outline: none;
}

.search-input:focus {
  border-color: #888;
}

.search-no-results {
  color: #888;
  font-size: 15px;
  margin-top: 8px;
}

.address-name-block {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.search-subtext {
  font-size: 13px;
  color: #888;
}

/* Login Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 12px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field label {
  font-size: 14px;
  font-weight: 600;
  color: #555;
}

.login-field input {
  padding: 12px;
  font-size: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-family: inherit;
  outline: none;
}

.login-field input:focus {
  border-color: #888;
}

.login-button {
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.login-button:active {
  background-color: #555;
}
