/*
 * TASK224_SUPPORT_LEGAL_GOLDEN_MASTER:
 * Task 224 is the approved VideoBot support and legal-page design. Do not redesign, combine, replace, or visually alter it without explicit user authorization.
 * Required unlock phrase: UNLOCK TASK 224 SUPPORT LEGAL DESIGN
 * Task 228 shared public footer unlock applies only to the canonical public footer below.
 */

.task228-footer {
  padding: clamp(3rem, 7vw, 5rem) 24px max(2rem, env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 10% 14%, rgba(255, 255, 255, 0.18), transparent 18rem),
    linear-gradient(145deg, #7c2fe8, #405fe0);
  color: #fff;
}

.task228-footer-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(250px, 1.15fr) minmax(0, 2.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.task228-footer-brand {
  display: grid;
  gap: 1rem;
}

.task228-footer .m-brand {
  min-height: 48px;
  min-width: 150px;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  font-weight: 950;
}

.task228-footer .m-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.task228-footer .m-brand-mark i {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #fff;
}

.task228-footer .m-brand strong,
.task228-footer .m-brand small {
  display: block;
}

.task228-footer .m-brand strong {
  font-size: 1.08rem;
  line-height: 1;
}

.task228-footer .m-brand small,
.task228-footer p {
  color: rgba(255, 255, 255, 0.8);
}

.task228-footer a,
.task228-footer strong,
.task228-footer h2 {
  color: #fff;
}

.task228-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.task228-footer a:hover,
.task228-footer a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.task228-footer a:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.72);
  outline-offset: 4px;
}

.task228-footer-email {
  margin: 0;
}

.task228-footer-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 40px;
  align-items: start;
}

.task228-footer-group {
  display: grid;
  align-content: start;
  gap: 0.85rem;
}

.task228-footer-group h2 {
  margin: 0;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 0.82rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task228-footer-group a {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 850;
  line-height: 1.25;
}

.task228-footer-bottom {
  width: min(1180px, 100%);
  margin: clamp(2rem, 5vw, 3rem) auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.86);
}

.task228-footer-bottom a {
  font-weight: 850;
}

@media (max-width: 1100px) {
  .task228-footer-shell {
    grid-template-columns: 1fr;
  }

  .task228-footer-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2.25rem;
  }
}

@media (max-width: 700px) {
  .task228-footer {
    padding-left: max(24px, env(safe-area-inset-left, 0px));
    padding-right: max(24px, env(safe-area-inset-right, 0px));
  }

  .task228-footer-shell,
  .task228-footer-brand,
  .task228-footer-groups,
  .task228-footer-bottom {
    display: grid;
  }

  .task228-footer-groups {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .task228-footer-group {
    gap: 0.9rem;
  }

  .task228-footer-group + .task228-footer-group {
    padding-top: 0.1rem;
  }

  .task228-footer-group a {
    min-height: 44px;
  }
}

.support-hero,
.legal-shell,
.support-form-shell,
.support-chat-layout,
.owner-support-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.support-hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

.support-hero h1,
.legal-shell h1,
.owner-support-shell h1 {
  margin: 0 auto 1rem;
  max-width: 780px;
  color: #17152b;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 0.98;
}

.support-hero p,
.legal-shell p,
.support-form-shell p,
.owner-support-shell p {
  color: #4f5874;
}

.support-chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.25rem;
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.support-chat-card,
.support-side-card,
.support-form-shell,
.legal-shell,
.owner-support-shell,
.owner-ticket-detail {
  border: 1px solid rgba(108, 92, 231, 0.16);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(31, 21, 84, 0.08);
}

.support-chat-card {
  overflow: hidden;
}

.support-chat-head {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem;
  background: linear-gradient(135deg, #7c2fe8, #405fe0);
  color: #fff;
}

.support-chat-head h2 {
  margin: 0 0 0.2rem;
}

.support-chat-head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.support-bot-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 950;
}

.support-messages {
  min-height: 360px;
  max-height: 56vh;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow: auto;
  padding: 1rem;
  background: #fbfaff;
}

.support-message {
  max-width: 82%;
  border: 1px solid rgba(108, 92, 231, 0.14);
  border-radius: 18px;
  padding: 0.85rem 1rem;
  background: #fff;
}

.support-message.user {
  align-self: flex-end;
  background: #eef0ff;
}

.support-message p {
  margin: 0;
}

.support-message a {
  color: #5b45e8;
  font-weight: 900;
}

.support-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.support-source-links a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: #f1efff;
}

.support-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 1rem 1rem 0;
  background: #fff;
}

.support-suggestions button,
.support-retry {
  min-height: 44px;
  border: 1px solid rgba(108, 92, 231, 0.18);
  border-radius: 999px;
  padding: 0.6rem 0.85rem;
  background: #fff;
  color: #4a35d5;
  font-weight: 900;
}

.support-typing {
  color: #5b5570;
}

.support-chat-form,
.support-contact-form {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.support-chat-form label,
.support-contact-form label {
  display: grid;
  gap: 0.4rem;
  color: #17152b;
  font-weight: 900;
}

.support-chat-form textarea,
.support-contact-form textarea,
.support-contact-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #ded9ef;
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  color: #17152b;
  background: #fff;
}

.support-chat-form textarea:focus,
.support-contact-form textarea:focus,
.support-contact-form input:focus {
  outline: none;
  border-color: #5b45e8;
  box-shadow: 0 0 0 4px rgba(91, 69, 232, 0.14);
}

.support-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: #6a6680;
}

.support-form-row button,
.support-chat-actions button,
.owner-ticket-detail button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
  background: linear-gradient(135deg, #7c2fe8, #405fe0);
  color: #fff;
  font-weight: 950;
}

.support-form-row button:disabled,
.support-chat-form textarea:disabled {
  cursor: wait;
  opacity: 0.65;
}

.support-chat-actions {
  padding: 0 1rem 1rem;
}

.support-notice,
.support-email-line,
.support-option,
.support-status {
  margin: 0;
  padding: 0 1rem 1rem;
  color: #5b5570;
}

.support-side-card {
  align-self: start;
  padding: 1.25rem;
}

.support-side-card h2 {
  margin-top: 0;
}

.support-form-shell {
  max-width: 780px;
  padding: 1.25rem;
  margin-bottom: clamp(3rem, 7vw, 6rem);
}

.support-option {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: #f1efff;
}

.support-honeypot {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field-error {
  color: #b42318;
  font-size: 0.9rem;
}

.legal-shell {
  max-width: 920px;
  padding: clamp(1.5rem, 4vw, 3rem);
  margin-top: clamp(2rem, 6vw, 5rem);
  margin-bottom: clamp(3rem, 7vw, 6rem);
}

.legal-shell article,
.legal-shell h2 {
  margin-top: 1.5rem;
}

.legal-shell h2 {
  color: #17152b;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
}

.owner-support-shell {
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.owner-support-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 1rem;
}

.owner-ticket-list {
  display: grid;
  gap: 0.65rem;
}

.owner-ticket-row {
  display: grid;
  gap: 0.25rem;
  border: 1px solid rgba(108, 92, 231, 0.14);
  border-radius: 16px;
  padding: 0.85rem;
  background: #fff;
}

.owner-ticket-row.active {
  border-color: #5b45e8;
  background: #f3f1ff;
}

.owner-ticket-detail {
  padding: 1.25rem;
}

.owner-ticket-message {
  white-space: pre-wrap;
  border-radius: 16px;
  padding: 1rem;
  background: #fbfaff;
  color: #17152b;
}

.owner-ticket-detail form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

@media (max-width: 820px) {
  .support-chat-layout,
  .owner-support-grid {
    grid-template-columns: 1fr;
  }

  .support-message {
    max-width: 94%;
  }

  .support-form-row {
    align-items: stretch;
    flex-direction: column;
  }

  .support-form-row button {
    width: 100%;
  }
}
