/* Fill the iframe */
html, body {
  height: 100%;
  width: 100%;
  margin: 0;
}

/* Outer host wrapper (full height, top aligned card) */
.channel-form-host {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: flex-start;      /* TOP align card */
  justify-content: center;      /* center horizontally */
  background: #f2f2f2;
  font-family: Arial, Helvetica, sans-serif;
}

/* Main card */
.channel-form {
  width: min(720px, calc(100% - 20px));
  height: calc(100% - 20px);
  margin: 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Layout sections */
.channel-form header,
.channel-form footer {
  padding: 18px 18px;           /* heading padded a bit more */
  background: #fafafa;
}

.channel-form header {
  border-bottom: 1px solid #eee;
}

.channel-form footer {
  border-top: 1px solid #eee;
}

.channel-form main {
  padding: 14px 18px;
  overflow: auto;
  flex: 1;
}

/* Typography (common tags) */
.channel-form h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .2px;
}

.channel-form h2 {
  margin: 12px 0 8px 0;
  font-size: 13px;
  font-weight: 800;
  color: #222;
}

.channel-form p {
  margin: 8px 0 0 0;
  font-size: 13px;
  color: #444;
  line-height: 1.35;
}

/* Inputs (common elements) */
.channel-form input,
.channel-form select,
.channel-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  padding: 10px 11px;
  font-size: 14px;
  outline: none;
  background: #fff;
  margin: 0 0 10px 0;
}

.channel-form textarea {
  min-height: 90px;
  resize: vertical;
}

.channel-form input:focus,
.channel-form select:focus,
.channel-form textarea:focus {
  border-color: #999;
}

/* Two-column row (first/last name) */
.channel-form .two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Labels + checkbox rows */
.channel-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #222;
  margin: 6px 0 10px 0;
}

.channel-form input[type="checkbox"] {
  width: auto;
  margin: 0;
}

/* Multi-checkbox grid */
.channel-form .checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin: 0 0 10px 0;
}

.channel-form .checkbox-grid label {
  margin: 0;
}

/* Subtext area */
.channel-form .subtext {
  font-size: 12px;
  font-weight: 700;
  color: #333;
  margin: 0 0 10px 0;
  line-height: 1.35;
}

/* Submit button */
.channel-form button[type="submit"] {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 12px;
  font-weight: 900;
  letter-spacing: .8px;
  background: #f44336;
  color: #fff;
  cursor: pointer;
}

.channel-form button[type="submit"]:disabled {
  opacity: .65;
  cursor: default;
}

/* Status / message line */
.channel-form .status {
  margin-top: 10px;
  font-size: 13px;
  color: #333;
}

/* Validation error highlight */
.channel-form .error {
  border-color: #c0392b !important;
}

/* Thank-you screen formatting: TOP aligned (not centered) */
.channel-form .thankyou {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;  /* TOP align content */
  align-items: flex-start;
  min-height: 100%;
  padding-top: 6px;
}

/* Responsive */
@media (max-width: 520px) {
  .channel-form .two-col {
    grid-template-columns: 1fr;
  }
  .channel-form .checkbox-grid {
    grid-template-columns: 1fr;
  }
}
