/* =====================================================
   PHIL INSTRUCTION / RESOURCE FORM
===================================================== */

.phil-instruction-form {
  margin-top: clamp(3rem, 6vw, 5rem);
}


/* =====================================================
   RESOURCE GUIDE
===================================================== */

.phil-resource-guide {
  padding:
    clamp(1.75rem, 4vw, 3rem);

  color: var(--phil-white);
  background: var(--phil-white-06);

  border: 1px solid var(--phil-white-25);
  border-radius: var(--phil-radius-medium);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 42px rgba(38, 34, 98, 0.12);
}


.phil-resource-guide-heading {
  display: grid;

  grid-template-columns:
    minmax(240px, 0.8fr)
    minmax(0, 1.2fr);

  align-items: end;

  gap: clamp(1.25rem, 3vw, 3rem);

  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}


.phil-resource-guide-heading h2 {
  margin: 0;

  color: var(--phil-white);

  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}


.phil-resource-guide-heading p {
  max-width: 620px;

  margin: 0;

  color: rgba(255, 255, 255, 0.78);

  font-size: 0.98rem;
  line-height: 1.5;
}


/* =====================================================
   RESOURCE EXAMPLE GRID
===================================================== */

.phil-resource-example-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: clamp(1rem, 2.5vw, 1.5rem);
}


.phil-resource-example {
  min-width: 0;

  padding: clamp(1.25rem, 3vw, 1.75rem);

  background: var(--phil-white-04);

  border: 1px solid var(--phil-white-18);
  border-radius: 18px;
}


.phil-resource-example h3 {
  margin: 0 0 0.75rem;

  color: var(--phil-pink);

  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}


.phil-resource-example p {
  margin: 0;

  color: rgba(255, 255, 255, 0.84);

  font-size: 0.9rem;
  line-height: 1.5;
}


/* =====================================================
   RESOURCE GUIDE NOTE
===================================================== */

.phil-resource-guide-note {
  display: grid;

  grid-template-columns:
    max-content
    minmax(0, 1fr);

  align-items: start;

  gap: 0.5rem 0.75rem;

  margin-top: clamp(1.5rem, 3vw, 2rem);
  padding: 1rem 1.2rem;

  background: rgba(242, 130, 170, 0.08);

  border:
    1px solid
    rgba(242, 130, 170, 0.32);

  border-radius: 14px;
}


.phil-resource-guide-note strong {
  color: var(--phil-pink);

  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
}


.phil-resource-guide-note span {
  color: rgba(255, 255, 255, 0.88);

  font-size: 0.92rem;
  line-height: 1.45;
}


/* =====================================================
   RADIO CHOICE GROUP
===================================================== */

.phil-form-choice-group {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 1rem;

  min-width: 0;

  margin: 0 0 clamp(2rem, 4vw, 3rem);
  padding: 0;

  border: 0;
}


.phil-form-choice-group legend {
  grid-column: 1 / -1;

  width: 100%;

  margin: 0 0 0.25rem;
  padding: 0;

  color: var(--phil-white);

  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.3;
}


/* =====================================================
   RADIO CHOICE CARD
===================================================== */

.phil-form-choice-card {
  position: relative;

  display: grid;

  grid-template-columns:
    22px
    minmax(0, 1fr);

  align-items: start;

  gap: 0.9rem;

  min-width: 0;

  padding: 1.25rem;

  color: var(--phil-white);
  background: var(--phil-white-04);

  border: 1px solid var(--phil-white-18);
  border-radius: 18px;

  cursor: pointer;

  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}


.phil-form-choice-card:hover {
  transform: translateY(-2px);

  background: var(--phil-white-08);
  border-color: var(--phil-white-40);
}


.phil-form-choice-card:has(
  input:checked
) {
  background:
    rgba(242, 130, 170, 0.1);

  border-color: var(--phil-pink);

  box-shadow:
    0 0 0 3px
    rgba(242, 130, 170, 0.12);
}


.phil-form-choice-card:has(
  input:focus-visible
) {
  outline: 3px solid var(--phil-pink);
  outline-offset: 3px;
}


/* =====================================================
   RADIO CONTROL
===================================================== */

.phil-form-choice-card input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;

  display: grid;

  width: 20px;
  height: 20px;

  place-content: center;

  margin: 0.15rem 0 0;

  background: rgba(38, 34, 98, 0.72);

  border: 2px solid var(--phil-white-40);
  border-radius: 50%;

  cursor: pointer;

  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}


.phil-form-choice-card
input[type="radio"]::before {
  content: "";

  width: 8px;
  height: 8px;

  background: var(--phil-pink);
  border-radius: 50%;

  transform: scale(0);

  transition: transform 150ms ease;
}


.phil-form-choice-card
input[type="radio"]:checked {
  border-color: var(--phil-pink);
}


.phil-form-choice-card
input[type="radio"]:checked::before {
  transform: scale(1);
}


/* =====================================================
   CHOICE CARD COPY
===================================================== */

.phil-form-choice-copy {
  display: block;
  min-width: 0;
}


.phil-form-choice-copy strong {
  display: block;

  margin-bottom: 0.45rem;

  color: var(--phil-white);

  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.25;
}


.phil-form-choice-copy > span {
  display: block;

  color: rgba(255, 255, 255, 0.72);

  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.48;
}


/* =====================================================
   SELECT EMPHASIS
===================================================== */

.phil-instruction-form select:required:invalid {
  color: rgba(255, 255, 255, 0.48);
}


.phil-instruction-form select option {
  color: var(--phil-navy);
}


/* =====================================================
   UPLOAD SECTION
===================================================== */

.phil-instruction-form
input[type="file"] {
  min-height: 64px;
}


.phil-instruction-form
input[type="file"]::file-selector-button {
  background:
    rgba(255, 255, 255, 0.1);
}


/* =====================================================
   TABLET
===================================================== */

@media screen and (max-width: 900px) {

  .phil-resource-example-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }


  .phil-resource-guide-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }


  .phil-form-choice-group {
    grid-template-columns: 1fr;
  }

}


/* =====================================================
   MOBILE
===================================================== */

@media screen and (max-width: 680px) {

  .phil-resource-guide {
    padding:
      1.5rem
      1.25rem;
  }


  .phil-resource-example-grid {
    grid-template-columns: 1fr;
  }


  .phil-resource-guide-note {
    grid-template-columns: 1fr;

    gap: 0.25rem;
  }


  .phil-form-choice-card {
    padding: 1.1rem;
  }

}


/* =====================================================
   SMALL MOBILE
===================================================== */

@media screen and (max-width: 460px) {

  .phil-resource-guide {
    padding:
      1.3rem
      1rem;

    border-radius: 18px;
  }


  .phil-resource-example {
    padding: 1.1rem;

    border-radius: 14px;
  }


  .phil-form-choice-card {
    grid-template-columns:
      20px
      minmax(0, 1fr);

    gap: 0.75rem;

    padding: 1rem;

    border-radius: 14px;
  }


  .phil-form-choice-card
  input[type="radio"] {
    width: 18px;
    height: 18px;
  }

}


/* =====================================================
   REDUCED MOTION
===================================================== */

@media (prefers-reduced-motion: reduce) {

  .phil-form-choice-card,
  .phil-form-choice-card
  input[type="radio"],
  .phil-form-choice-card
  input[type="radio"]::before {
    transition: none;
  }

}