/* Contactus public + admin structure. Visual identity via active theme tokens. */

.contactus-page {
  --cu-ink: var(--bs-secondary, #1f2a2e);
  --cu-muted: rgba(var(--bs-secondary-rgb, 31, 42, 46), 0.65);
  --cu-line: rgba(var(--bs-secondary-rgb, 31, 42, 46), 0.18);
  --cu-surface: var(--bs-body-bg, #fff);
  --cu-accent: var(--bs-primary, #d4b46a);
  --cu-accent-soft: rgba(var(--bs-primary-rgb, 212, 180, 106), 0.22);
  box-sizing: border-box;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  color: var(--cu-ink);
}

.contactus-page *,
.contactus-page *::before,
.contactus-page *::after {
  box-sizing: border-box;
}

.contactus-page__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  font-weight: 700;
}

/* Intro: Bootstrap row/col — image top-right on sm+ */
.contactus-page__intro {
  margin: 0 0 1.5rem;
  align-items: flex-start;
}

.contactus-page__lead {
  margin: 0;
  line-height: 1.55;
  color: var(--cu-muted);
  min-width: 0;
}

.contactus-page__lead p {
  margin: 0 0 0.75rem;
  color: inherit;
}

.contactus-page__lead p:last-child {
  margin-bottom: 0;
}

.contactus-page__media {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.contactus-page__media-img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  background: transparent;
}

@media (max-width: 575.98px) {
  .contactus-page__media {
    justify-content: center;
  }

  .contactus-page__media-img {
    max-width: 220px;
  }
}

.contactus-form {
  margin: 0;
}

.contactus-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  height: 100%;
}

.contactus-field label,
.contactus-field .contactus-field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cu-ink);
}

/*
 * Theme .form-control uses transparent bg + border-color 0 (invisible).
 * .contactus-control restores a normal visible field using theme tokens.
 * !important beats later theme .btn/.form-control utility layers.
 */
.contactus-page .contactus-control.form-control,
.contactus-page .contactus-control.form-select,
.contactus-page input.contactus-control,
.contactus-page select.contactus-control,
.contactus-page textarea.contactus-control {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 2.85rem !important;
  margin: 0 !important;
  padding: 0.7rem 0.9rem !important;
  color: var(--cu-ink) !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  appearance: auto !important;
  background-color: var(--cu-surface) !important;
  background-image: none !important;
  border: 1px solid var(--cu-line) !important;
  border-radius: 0.55rem !important;
  box-shadow: none !important;
}

.contactus-page select.contactus-control.form-select {
  padding-right: 2.4rem !important;
  background-image: var(--bs-form-select-bg-img, none) !important;
  background-repeat: no-repeat !important;
  background-position: right 0.85rem center !important;
  background-size: 16px 12px !important;
  appearance: none !important;
}

.contactus-page .contactus-control:focus,
.contactus-page .contactus-control:focus-visible {
  color: var(--cu-ink) !important;
  background-color: var(--cu-surface) !important;
  border-color: var(--cu-accent) !important;
  outline: 0 !important;
  box-shadow: 0 0 0 0.2rem var(--cu-accent-soft) !important;
}

.contactus-page textarea.contactus-control {
  min-height: 9rem !important;
  resize: vertical;
}

.contactus-field__error {
  color: #b42318;
  font-size: 0.85rem;
}

.contactus-form__alerts {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
}

/*
 * Shared fx_geo phone UI — same joined pattern as my_account_pls / admin.
 * Theme .btn is a gold pill CTA; reset the country selector hard.
 */
.contactus-page .fx-phone-field {
  width: 100%;
  position: relative;
}

.contactus-page .fx-phone-control.input-group,
.contactus-page .fx-phone-control {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  width: 100% !important;
  position: relative;
  border: 1px solid var(--cu-line) !important;
  border-radius: 0.55rem !important;
  background: var(--cu-surface) !important;
  overflow: visible !important;
  gap: 0 !important;
}

.contactus-page .fx-phone-control:focus-within {
  border-color: var(--cu-accent) !important;
  box-shadow: 0 0 0 0.2rem var(--cu-accent-soft) !important;
}

.contactus-page .fx-phone-country-btn.btn,
.contactus-page .fx-phone-country-btn {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  width: auto !important;
  max-width: 7.5rem !important;
  min-height: 2.85rem !important;
  height: auto !important;
  padding: 0.4rem 0.6rem !important;
  margin: 0 !important;
  border: 0 !important;
  border-right: 1px solid var(--cu-line) !important;
  border-radius: 0.55rem 0 0 0.55rem !important;
  background: rgba(var(--bs-secondary-rgb, 31, 42, 46), 0.06) !important;
  background-color: rgba(var(--bs-secondary-rgb, 31, 42, 46), 0.06) !important;
  color: var(--cu-ink) !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.contactus-page .fx-phone-country-btn.btn:hover,
.contactus-page .fx-phone-country-btn.btn:focus,
.contactus-page .fx-phone-country-btn.btn:active,
.contactus-page .fx-phone-country-btn.btn.show {
  background: rgba(var(--bs-secondary-rgb, 31, 42, 46), 0.1) !important;
  background-color: rgba(var(--bs-secondary-rgb, 31, 42, 46), 0.1) !important;
  color: var(--cu-ink) !important;
  box-shadow: none !important;
}

.contactus-page .fx-phone-country-btn.btn::after {
  margin-left: 0.2rem;
  opacity: 0.7;
}

.contactus-page .fx-phone-flag {
  width: 18px;
  height: 12px;
  object-fit: cover;
  flex: 0 0 auto;
}

.contactus-page .fx-phone-dial-prefix {
  font-weight: 600;
}

.contactus-page .fx-phone-control > .fx-phone-national-input,
.contactus-page .fx-phone-national-input.contactus-control,
.contactus-page .fx-phone-national-input.form-control {
  flex: 1 1 auto !important;
  width: 1% !important;
  max-width: none !important;
  min-width: 4rem !important;
  min-height: 2.85rem !important;
  padding: 0.7rem 0.9rem !important;
  border: 0 !important;
  border-radius: 0 0.55rem 0.55rem 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
  color: var(--cu-ink) !important;
}

.contactus-page .fx-phone-control > .dropdown-menu,
.contactus-page .fx-phone-country-menu {
  position: absolute !important;
  inset: auto auto auto 0 !important;
  top: 100% !important;
  left: 0 !important;
  float: none !important;
  max-height: 250px;
  overflow: auto;
  min-width: 16rem;
  z-index: 1055;
}

/* Light CKEditor — full form width */
.contactus-page .contactus-field--comments .cke {
  max-width: 100%;
}

.contactus-page .contactus-field--comments .cke_chrome {
  width: 100% !important;
  border-radius: 0.55rem !important;
  border: 1px solid var(--cu-line) !important;
  overflow: hidden;
}

.contactus-security__captcha {
  gap: 0.5rem;
}

.contactus-security__img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 0.4rem;
  border: 1px solid var(--cu-line);
  background: var(--cu-surface);
}

.contactus-security__status {
  min-height: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.25rem;
}

.contactus-security__status.is-ok {
  color: #198754;
  font-weight: 600;
}

.contactus-page #contactus-sec-code.is-valid {
  border-color: rgba(25, 135, 84, 0.55) !important;
  box-shadow: 0 0 0 0.15rem rgba(25, 135, 84, 0.15) !important;
}

.contactus-form__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 3.5rem;
  margin: 0.35rem 0 0;
}

.contactus-form__actions.is-captcha-locked .contactus-form__submit[hidden],
.contactus-form__actions .contactus-form__submit[hidden] {
  display: none !important;
}

.contactus-form__actions .contactus-form__submit {
  min-width: 10rem;
}

.contactus-thanks {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.contactus-thanks__body {
  margin: 1rem 0 1.5rem;
  line-height: 1.55;
}

.contactus-thanks__message {
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--cu-line, rgba(0, 0, 0, 0.1));
  background: rgba(var(--bs-secondary-rgb, 31, 42, 46), 0.04);
}

.contactus-thanks__meta {
  margin: 0 0 1.5rem;
  opacity: 0.85;
}

@media (max-width: 575.98px) {
  .contactus-page {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
}

/* Admin */
.contactus-admin {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.contactus-admin__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.contactus-admin__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.contactus-admin__table-wrap {
  overflow-x: auto;
}

.contactus-admin__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.contactus-admin__table th,
.contactus-admin__table td {
  padding: 0.75rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  vertical-align: top;
}

.contactus-admin__table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.75;
}

.contactus-admin__status {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #12b76a;
}

.contactus-admin__status.is-off {
  background: #f04438;
}

.contactus-admin__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.contactus-admin__panel {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.contactus-admin__panel h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

/* Admin preview of public welcome / thanks messages */
.contactus-admin-preview {
  margin: 1.25rem 0 0;
  padding: 1rem 1.1rem 1.15rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.65);
}

.contactus-admin-preview__title {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.contactus-admin-preview__body {
  align-items: flex-start;
}

.contactus-admin-preview__text {
  margin: 0;
  line-height: 1.55;
  font-size: 0.95rem;
  min-width: 0;
}

.contactus-admin-preview__text p {
  margin: 0 0 0.65rem;
}

.contactus-admin-preview__text p:last-child,
.contactus-admin-preview__text h2:last-child {
  margin-bottom: 0;
}

.contactus-admin-preview__text h2 {
  margin: 0 0 0.65rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.contactus-admin-preview__media {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.contactus-admin-preview__media .contactus-page__media-img {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
}

@media (max-width: 575.98px) {
  .contactus-admin-preview__media {
    justify-content: center;
  }

  .contactus-admin-preview__media .contactus-page__media-img {
    max-width: 160px;
  }
}

.contactus-dept-edit__section {
  margin: 1rem 0;
  padding-top: 0.15rem;
}

.contactus-dept-edit__section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.contactus-dept-edit__title {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.2;
}

.contactus-dept-edit__head .contactus-dept-edit__langctx {
  max-width: none;
  width: 100%;
}

.contactus-dept-edit__langctx .form-select {
  min-height: 2.5rem;
  width: 100%;
}

/* Phone+Email columns: match control height */
.contactus-dept-edit__phone-email .form-control {
  min-height: 2.5rem;
}

.contactus-dept-edit .fx-phone-field {
  width: 100%;
  position: relative;
}

/*
 * CONTACTUS admin was stacking the shared phone control because:
 * 1) Bootstrap .input-group uses flex-wrap:wrap
 * 2) .contactus-field .form-control { width:100% } forces the national input onto a new line
 * Keep country selector + national number as ONE horizontal control.
 */
.contactus-dept-edit .fx-phone-control.input-group,
.contactus-dept-edit .fx-phone-control {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  width: 100%;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 0.4rem;
  background: #fff;
  overflow: visible;
}

.contactus-dept-edit .fx-phone-control:focus-within {
  border-color: rgba(13, 110, 253, 0.55);
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

.contactus-dept-edit .fx-phone-country-btn {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  max-width: 7.25rem;
  min-height: 2.5rem;
  height: auto;
  padding: 0.35rem 0.5rem;
  margin: 0;
  border: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.4rem 0 0 0.4rem;
  background: #f7f7f8;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.contactus-dept-edit .fx-phone-flag {
  width: 18px;
  height: 12px;
  object-fit: cover;
  flex: 0 0 auto;
}

.contactus-dept-edit .fx-phone-control > .fx-phone-national-input,
.contactus-dept-edit .fx-phone-national-input.form-control {
  flex: 1 1 auto !important;
  width: 1% !important; /* Bootstrap input-group flex fill */
  max-width: none !important;
  min-width: 0 !important;
  min-height: 2.5rem;
  border: 0 !important;
  border-radius: 0 0.4rem 0.4rem 0 !important;
  box-shadow: none !important;
  background: transparent;
}

.contactus-dept-edit .fx-phone-control > .dropdown-menu,
.contactus-dept-edit .fx-phone-country-menu {
  position: absolute !important;
  top: 100%;
  left: 0;
  max-height: 250px;
  overflow: auto;
  min-width: 16rem;
  z-index: 1055;
}

@media (max-width: 575.98px) {
  .contactus-dept-edit__head .col-sm-6 + .col-sm-6 {
    margin-top: 0.75rem;
  }
}

/* ---- Admin form messages edit (welcome / thanks) ---- */
.contactus-form-edit__title {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.2;
}

.contactus-form-edit__langctx {
  width: 100%;
}

.contactus-form-edit__langctx .form-select {
  min-height: 2.5rem;
  width: 100%;
}

.contactus-form-edit__section {
  margin: 1.25rem 0;
  padding-top: 0.25rem;
}

.contactus-form-edit__section h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.contactus-form-edit__hint {
  font-size: 0.875rem;
}

.contactus-form-edit .cke {
  max-width: 100%;
}

.contactus-form-edit .cke_chrome {
  width: 100% !important;
}

@media (max-width: 575.98px) {
  .contactus-form-edit__head .col-sm-6 + .col-sm-6 {
    margin-top: 0.75rem;
  }
}
