/**
 * @file
 * Classroom management styles for the youth zone.
 */

/* Forms */
.dx-youth-form-wrap {
  max-width: 640px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.dx-youth-form__group {
  margin-bottom: 1rem;
}

.dx-youth-form__group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.dx-youth-form__group input,
.dx-youth-form__group textarea,
.dx-youth-form__group select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--dx-line, #ddd);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: var(--dx-body, inherit);
}

.dx-youth-form__group input:focus,
.dx-youth-form__group textarea:focus {
  outline: none;
  border-color: var(--dx-accent, #0066cc);
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.15);
}

.dx-youth-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.dx-youth-form__actions {
  margin-top: 1.5rem;
}

.dx-youth-form__message {
  margin-top: 1rem;
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
  min-height: 1.5em;
}

.dx-youth-form__message--ok {
  background: #e8f5e9;
  color: #2e7d32;
}

.dx-youth-form__message--error {
  background: #fce4ec;
  color: #c62828;
}

.dx-youth-form__footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

/* Cards */
.dx-youth-card {
  background: var(--dx-surface, #fff);
  border: 1px solid var(--dx-line, #eee);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.dx-youth-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.dx-youth-card h3 a {
  text-decoration: none;
  color: inherit;
}

.dx-youth-card__meta {
  font-size: 0.85rem;
  color: #666;
  margin: 0.25rem 0;
}

.dx-youth-card__body {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Tables */
.dx-youth-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.dx-youth-table th,
.dx-youth-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--dx-line, #eee);
}

.dx-youth-table th {
  font-weight: 600;
  background: var(--dx-surface-alt, #f8f9fa);
}

.dx-youth-table tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

/* Badges */
.dx-youth-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.dx-youth-badge--student {
  background: #e3f2fd;
  color: #1565c0;
}

.dx-youth-badge--parent {
  background: #f3e5f5;
  color: #7b1fa2;
}

.dx-youth-badge--teacher {
  background: #e8f5e9;
  color: #2e7d32;
}

.dx-youth-badge--done {
  background: #e8f5e9;
  color: #2e7d32;
}

/* Attendance */
.dx-youth-attendance__status--signed {
  color: #2e7d32;
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: #e8f5e9;
  border-radius: 6px;
  display: inline-block;
}

.dx-youth-attendance__checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid var(--dx-line, #eee);
  border-radius: 6px;
}

.dx-youth-attendance__checkboxes label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Exam */
.dx-youth-exam__timer {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  padding: 0.75rem;
  background: var(--dx-surface-alt, #f8f9fa);
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.dx-youth-exam__question {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--dx-line, #eee);
  border-radius: 8px;
}

.dx-youth-exam__question h3 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.dx-youth-exam__option {
  display: block;
  padding: 0.4rem 0;
  font-weight: normal;
  cursor: pointer;
  font-size: 0.95rem;
}

.dx-youth-exam__fill {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--dx-line, #ddd);
  border-radius: 6px;
  font-size: 0.95rem;
}

.dx-youth-exam__result {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #e8f5e9;
  border-radius: 8px;
  text-align: center;
}

/* Project */
.dx-youth-project__progress {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  margin: 1rem 0;
  overflow: hidden;
}

.dx-youth-project__bar {
  height: 100%;
  background: var(--dx-accent, #0066cc);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.dx-youth-project__phases {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.dx-youth-project__phase {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-left: 3px solid #e0e0e0;
}

.dx-youth-project__phase--active {
  border-left-color: var(--dx-accent, #0066cc);
}

.dx-youth-project__phase--completed {
  border-left-color: #2e7d32;
}

.dx-youth-project__members {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dx-youth-project__members li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: var(--dx-surface-alt, #f8f9fa);
  border-radius: 20px;
  font-size: 0.9rem;
}

.dx-youth-project__log {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--dx-line, #eee);
}

.dx-youth-project__log-date {
  font-size: 0.8rem;
  color: #999;
}

/* Section */
.dx-youth-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.dx-youth-section__intro {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 640px) {
  .dx-youth-form__row {
    grid-template-columns: 1fr;
  }

  .dx-youth-attendance__checkboxes {
    grid-template-columns: 1fr;
  }

  .dx-youth-table {
    font-size: 0.8rem;
  }

  .dx-youth-table th,
  .dx-youth-table td {
    padding: 0.35rem 0.5rem;
  }
}

/* ==========================================================================
   Education Zone Landing & Tier Pages
   ========================================================================== */

.edu-landing {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.edu-landing__hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.edu-landing__hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.edu-landing__subtitle {
  color: #666;
  font-size: 1.1rem;
}

.edu-landing__tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.edu-landing__card {
  display: block;
  padding: 1.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}

.edu-landing__card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.edu-landing__card--k12 { border-left: 4px solid #4CAF50; }
.edu-landing__card--highschool { border-left: 4px solid #2196F3; }
.edu-landing__card--college { border-left: 4px solid #FF5722; }

.edu-landing__icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.edu-landing__label {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.edu-landing__desc {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

.edu-landing__links {
  text-align: center;
  padding: 1rem 0;
  color: #888;
}

.edu-landing__links a {
  color: #1976D2;
  text-decoration: none;
}

.edu-landing__sep {
  margin: 0 0.75rem;
  color: #ccc;
}

/* Tier home pages (high school / college). */

.edu-tier {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.edu-tier__hero {
  text-align: center;
  margin-bottom: 2rem;
}

.edu-tier__hero h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.edu-tier__subtitle {
  color: #666;
  font-size: 1rem;
}

.edu-tier--highschool .edu-tier__hero h1 { color: #1565C0; }
.edu-tier--college .edu-tier__hero h1 { color: #D84315; }

.edu-tier__sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.edu-tier__section {
  padding: 1.25rem;
  background: #fafafa;
  border-radius: 8px;
}

.edu-tier__section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.edu-tier__section p {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.edu-tier__placeholder {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: #e3f2fd;
  color: #1565C0;
  border-radius: 4px;
  font-size: 0.85rem;
}

.edu-tier__nav {
  text-align: center;
  padding: 1rem 0;
}

.edu-tier__nav a {
  color: #1976D2;
  text-decoration: none;
}

/* Education profile setup */
.edu-profile-setup {
  max-width: 640px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.edu-profile-header {
  text-align: center;
  margin-bottom: 2rem;
}

.edu-profile-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.edu-profile-header p {
  color: #555;
  font-size: 0.95rem;
}

.edu-profile-form .form-group {
  margin-bottom: 1.25rem;
}

.edu-profile-form .form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.edu-profile-form .form-group input,
.edu-profile-form .form-group textarea,
.edu-profile-form .form-group select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--dx-line, #ddd);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: var(--dx-body, inherit);
}

.edu-profile-form .form-group input:focus,
.edu-profile-form .form-group textarea:focus,
.edu-profile-form .form-group select:focus {
  outline: none;
  border-color: var(--dx-accent, #0066cc);
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.15);
}

.edu-profile-form .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.edu-profile-form .required {
  color: #d32f2f;
}

.tier-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tier-option {
  flex: 1;
  min-width: 120px;
  cursor: pointer;
}

.tier-option input[type="radio"] {
  display: none;
}

.tier-option .tier-label {
  display: block;
  text-align: center;
  padding: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
  background: #fafafa;
}

.tier-option input[type="radio"]:checked + .tier-label {
  border-color: #1976D2;
  background: #e3f2fd;
  color: #1565C0;
}

.tier-option .tier-label:hover {
  border-color: #90caf9;
  background: #f5f9ff;
}

.form-actions {
  text-align: center;
  margin-top: 2rem;
}

.form-actions .btn {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  border: none;
}

.form-actions .btn-primary {
  background: #1976D2;
  color: white;
}

.form-actions .btn-primary:hover {
  background: #1565C0;
}

.form-actions .btn-primary:disabled {
  background: #90caf9;
  cursor: not-allowed;
}

.profile-message {
  text-align: center;
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.profile-message.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.profile-message.error {
  background: #ffebee;
  color: #c62828;
}

/* K12 resources page */
.edu-resources {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.edu-resources__hero {
  text-align: center;
  margin-bottom: 2rem;
}

.edu-resources__hero h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.edu-resources__subtitle {
  color: #555;
  font-size: 0.95rem;
}

.edu-resources__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.edu-resources__card {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
}

.edu-resources__card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.edu-resources__card p {
  color: #666;
  font-size: 0.85rem;
  margin: 0;
}

/* OSS file list sections */
.edu-resources__section,
.edu-tier__section {
  margin-bottom: 2rem;
}

.edu-resources__section h2,
.edu-tier__section h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #e0e0e0;
}

.edu-resources__file-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.4rem 1.5rem;
}

.edu-resources__file-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.edu-resources__file-list li a {
  color: #1a73e8;
  text-decoration: none;
  font-size: 0.9rem;
  word-break: break-word;
}

.edu-resources__file-list li a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .edu-resources__file-list {
    grid-template-columns: 1fr;
  }
}
