/* Prevent form from overflowing its container */
.ytism-free-download-form {
  box-sizing: border-box;
  width: 100%;
}

/* ── 2-column grid: labels left, fields right ── */
.ytism-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  row-gap: 20px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

/* All field labels — column 1 */
.ytism-grid > label {
  grid-column: 1;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0;
  color: #ffffff;
  white-space: normal;
  max-width: 100px;
  word-break: break-word;
  text-shadow: 0px 3px 4px rgba(0, 0, 0, 0.25);
}

/* All inputs and selects — column 2 */
.ytism-grid input[type="text"],
.ytism-grid input[type="email"],
.ytism-grid input[type="number"],
.ytism-grid select {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-radius: 120px;
  box-shadow: 0px 4px 7.3px 4px #00000040;
}

/* Age wrap sits in column 2, keeps error below the input */
.ytism-age-wrap {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-sizing: border-box;
}

.ytism-age-wrap input[type="number"] {
  grid-column: unset;
  width: 100%;
  box-sizing: border-box;
}

/* Age error */
.ytism-age-error {
  display: block;
  margin-top: 4px;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  color: #ff5a5a;
}

/* Fieldset — column 2 only, centered */
.ytism-grid fieldset {
  grid-column: 2;
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
  box-sizing: border-box;
  text-align: center;
}

/* Legend */
.ytism-grid fieldset legend {
  display: block;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: center;
  color: #ffffff;
  margin-bottom: 8px;
  white-space: normal;
  word-break: break-word;
  width: 100%;
  box-sizing: border-box;
  text-shadow: 0px 3px 4px rgba(0, 0, 0, 0.25);
}

/* Radio labels inside fieldset */
.ytism-grid fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
  color: #ffffff;
  margin-right: 20px;
  white-space: nowrap;
  text-shadow: 0px 3px 4px rgba(0, 0, 0, 0.25);
}

/* Submit button — column 2 only, centered */
.ytism-grid button {
  grid-column: 2;
  width: 100%;
  max-width: fit-content;
  box-sizing: border-box;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 36px;
  border: 1px solid #f6da46;
  border-radius: 50px;
  background: linear-gradient(
    97.7deg,
    #48306d 0.69%,
    #c24a82 46.04%,
    #f87458 100.97%
  );
  color: #fff;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
}

.ytism-grid button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.ytism-grid button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Select custom arrow */
.ytism-grid select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5l6.5 6 6.5-6' stroke='%23A95274' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 36px;
}

/* Response message */
.ytism-message {
  text-align: center;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.ytism-message.success {
  margin-top: 20px;
  color: white;
}

.ytism-message.error {
  margin-top: 20px;
  color: #ff5a5a;
}

/* ── Mobile: stack labels above inputs ── */
@media (max-width: 767px) {
  .ytism-grid {
    grid-template-columns: 1fr;
  }

  .ytism-grid > label {
    grid-column: 1;
    max-width: 100%;
  }

  .ytism-grid input[type="text"],
  .ytism-grid input[type="email"],
  .ytism-grid input[type="number"],
  .ytism-grid select,
  .ytism-age-wrap,
  .ytism-grid fieldset,
  .ytism-grid button {
    grid-column: 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .ytism-grid button {
    padding: 24px 36px;
    white-space: normal;
    word-break: break-word;
  }
}
