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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

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

header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: #1a1a2e;
  color: white;
  border-radius: 8px;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 5px;
}

.subtitle {
  opacity: 0.8;
  font-size: 1.1rem;
}

section {
  background: white;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

h2 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #1a1a2e;
}

.instructions ol {
  margin-left: 20px;
}

.instructions li {
  margin-bottom: 8px;
}

/* District Finder */
.district-finder {
  background: #f0f4f8;
  padding: 15px 20px;
  font-size: 14px;
  color: #555;
}

.district-finder a {
  color: #1a1a2e;
  font-weight: 500;
}

/* Organization Tree */
.org-tree {
  list-style: none;
}

.org-item {
  margin-bottom: 4px;
}

.org-header {
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
}

.org-header:hover {
  background: #f0f0f0;
}

.org-toggle {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  font-size: 12px;
  color: #666;
  user-select: none;
}

.org-toggle.has-children {
  cursor: pointer;
}

.org-toggle.has-children:hover {
  color: #333;
}

.org-checkbox {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.org-name {
  flex: 1;
}

.org-children {
  margin-left: 28px;
  display: none;
}

.org-children.expanded {
  display: block;
}

/* Indeterminate state for parent checkboxes */
.org-checkbox.indeterminate {
  opacity: 0.6;
}

/* Calendar URL Section */
.calendar-url {
  border: 2px solid #1a1a2e;
}

.url-box {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

#calendar-url {
  flex: 1;
  padding: 12px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f9f9f9;
}

#copy-btn {
  padding: 12px 24px;
  background: #1a1a2e;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

#copy-btn:hover {
  background: #2d2d4a;
}

#copy-btn.copied {
  background: #28a745;
}

.url-hint {
  font-size: 13px;
  color: #666;
  margin-bottom: 15px;
}

/* Calendar Instructions */
.calendar-instructions {
  margin-top: 15px;
}

.calendar-instructions details {
  margin-bottom: 8px;
  border: 1px solid #eee;
  border-radius: 4px;
}

.calendar-instructions summary {
  padding: 10px 15px;
  cursor: pointer;
  background: #f9f9f9;
  font-weight: 500;
}

.calendar-instructions summary:hover {
  background: #f0f0f0;
}

.calendar-instructions ol {
  padding: 15px 15px 15px 35px;
}

.calendar-instructions li {
  margin-bottom: 5px;
  font-size: 14px;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: 14px;
}

footer p {
  margin-bottom: 8px;
}

footer .active-users {
  font-size: 13px;
  color: #888;
  font-style: italic;
}

footer .credit {
  margin-top: 15px;
  font-weight: 500;
  color: #333;
}

footer .contact {
  font-size: 13px;
}

footer .contact a {
  color: #1a1a2e;
}

footer .social {
  margin-top: 10px;
}

footer .social a {
  color: #1a1a2e;
  text-decoration: none;
}

footer .social a:hover {
  text-decoration: underline;
}

/* Refresh note */
.refresh-note {
  margin-top: 20px;
  padding: 12px 15px;
  background: #f8f9fa;
  border-left: 3px solid #1a1a2e;
  font-size: 13px;
  color: #555;
}

/* Selection count badge */
.selection-count {
  display: inline-block;
  background: #1a1a2e;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  margin-left: 10px;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 10px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .url-box {
    flex-direction: column;
  }

  #copy-btn {
    width: 100%;
  }
}
