/* ============================================================
   CSS 17.10 — Everything together: an admission page
   ============================================================
   Forms: 01 field basics · 02 labels + star · 03 focus · 04 valid/invalid
          05 radio colour · 06 buttons
   Tables: 07 basics · 08 zebra + hover + caption · 09 scroll box
   Layout: grid (lesson 13) — form and table side by side from 900px.
   ============================================================ */

/* ---------- layout ---------- */
.admission-page {
  display: grid;
  gap: 24px;
  max-width: 1150px;
}

@media (min-width: 900px) {
  .admission-page {
    grid-template-columns: 380px 1fr;   /* form | table */
    align-items: start;
  }
}

/* ---------- the form ---------- */
.form-card label {
  display: block;                       /* 02 */
  font-weight: bold;
  margin: 14px 0 6px;
}

.form-card label.inline {
  display: inline-block;                /* radio labels sit side by side */
  font-weight: normal;
  margin: 0 18px 0 0;
}

.required::after {
  content: " *";
  color: #E54B4F;
}

.form-card input[type="text"],
.form-card input[type="email"],
.form-card select {
  font: inherit;                        /* 01 */
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 2px solid #C9C9C9;
  border-radius: 8px;
}

.form-card input:focus,
.form-card select:focus {
  border-color: #2D62EF;                /* 03 */
  outline: 3px solid rgba(45, 98, 239, 0.25);
}

.form-card input:user-invalid { border-color: #E54B4F; background-color: #FDECEC; }   /* 04 */
.form-card input:user-valid   { border-color: #1F9D55; }

.form-card input[type="radio"] {
  accent-color: #1F9D55;                /* 05 */
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.actions {
  margin-top: 20px;
}

.btn {                                  /* 06 */
  font: inherit;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 8px;
  border: 2px solid #2D62EF;
  cursor: pointer;
  margin-right: 8px;
}

.btn-primary { background-color: #2D62EF; color: #FFFFFF; }
.btn-primary:hover { background-color: #1A47C2; border-color: #1A47C2; }
.btn-secondary { background-color: #FFFFFF; color: #2D62EF; }
.btn-secondary:hover { background-color: #EEF3FF; }

/* ---------- the table ---------- */
.table-box {
  overflow-x: auto;                     /* 09 */
}

.fees {
  border-collapse: collapse;            /* 07 */
  width: 100%;
  min-width: 560px;
}

.fees th,
.fees td {
  padding: 10px 14px;
  border-bottom: 1px solid #E4E4E4;
  text-align: left;
}

.fees th { background-color: #0F1B3D; color: #FFFFFF; }
.fees .num { text-align: right; }
.fees tbody tr:nth-child(even) { background-color: #F4F5F7; }   /* 08 */
.fees tbody tr:hover { background-color: #FFF6E0; }
.fees td:last-child { font-weight: bold; color: #1F9D55; }
.fees caption { caption-side: top; text-align: left; font-weight: bold; font-size: 20px; padding-bottom: 10px; }


/* ------------------------------------------------------------
   Only to make the page look neat — not part of this lesson
   ------------------------------------------------------------ */
body { font-family: Arial, sans-serif; font-size: 16px; padding: 10px; }
.form-card { padding: 20px 24px; border: 1px solid #E4E4E4; border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06); }
.form-card h2 { margin: 0 0 4px; }
.group-title { font-weight: bold; margin: 16px 0 6px; }


/* ============================================================
   Lesson 17 — Quick summary
   ============================================================
   FORMS
     input, select, textarea, button { font: inherit; }   ← first thing to add
     width: 100% + box-sizing: border-box   → equal-width fields
     label { display: block; }              → label above the field
     :focus / :focus-visible                → never remove focus without a new style
     :user-invalid / :user-valid            → red / green after typing
     accent-color                           → colour of ticks and radio dots
     .btn + .btn-primary / .btn-secondary, :disabled
   TABLES
     border-collapse: collapse;  padding on th, td;  numbers text-align: right
     tr:nth-child(even) stripes, tr:hover highlight, <caption> title
     wide tables: wrap in a box with overflow: auto; sticky th

   Practice tasks:
     1. Make a "Contact us" form: name, email, message, submit — all styled.
     2. Make the email field show a red message when it is wrong (:user-invalid + .hint).
     3. Style a semester marks table with zebra rows and a sticky header.
   ============================================================ */
