/*
 * /start/random domain base.
 *
 * These rules are the still-active random-chat primitives migrated out of the
 * retired monolithic start.css. This file intentionally loads before
 * start_entry.css so the existing cascade and rendered UI stay unchanged.
 * Shared chat geometry belongs to chat_ui.css; Stage 8 state/layout overrides
 * belong to start_entry.css.
 */

body {
  overflow: hidden;
}

input:focus {
  outline: none;
}

#start_body_wrap {
  margin: 0 auto;
  width: 100%;
}

#chat_wrap a {
  text-decoration: none !important;
  font-weight: 600;
  color: var(--hf-color-primary-text);
}

#chat_wrap a:hover {
  font-weight: 800;
}

#chat_entering_check {
  float: left;
  box-sizing: border-box;
  padding: 9px 11px;

  color: #59636a;
  background-color: #ffffff;
  border: 1px solid #e2e2e2;
  border-radius: 12px;

  font-size: 13px;
  font-family: var(--hf-chat-message-font-family);
  line-height: 1.5;
  white-space: nowrap;
}

.official_message_wrap {
  line-height: 1.8;
  word-wrap: break-word;
  border-radius: 8px;
  text-align: center;
  padding: 5px 15px;
  margin-top: 5px;
  margin-bottom: 5px;
  background-color: #ffffff;
  color: #000000;
  border: 1px solid var(--hf-color-primary);
}

.random-chat-quality-notice {
  color: #70520b;
  background-color: #fffaf0;
  border-color: #edcf88;
}

.random-chat-milestone-notice {
  color: #175a72;
  background-color: #f4fbff;
  border-color: #8bd8f4;
  font-weight: 600;
}

.random-chat-ended-card {
  /* 기존 오피셜 메시지와 같은 여백과 테두리를 사용한다. */
}

.random-chat-ended-summary {
  text-align: center;
}

.random-chat-positive-self-notice {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 7px;
  background-color: #f2fbf6;
  color: #35684b;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.random-chat-ended-title {
  display: block;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.random-chat-ended-meta {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.random-chat-feedback {
  margin: 10px 0 0;
  padding: 10px 0 0;
  color: inherit;
  border-top: 1px solid rgba(var(--hf-color-primary-rgb), 0.16);
  text-align: center;
}

.random-chat-feedback-primary,
.random-chat-end-actions,
.random-chat-secondary-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.random-chat-end-actions {
  margin: 2px 0 18px;
}

.random-chat-end-actions .btn {
  min-width: 180px;
  border-radius: 8px;
}

.random-chat-feedback-title {
  margin: 0 0 10px;
  color: var(--hf-color-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}

.random-chat-feedback.is-selecting-reason .random-chat-feedback-title {
  margin-bottom: 2px;
  color: var(--hf-color-text);
}

.random-chat-feedback-title.is-submitted {
  margin-bottom: 0;
  color: var(--hf-color-success);
}

.random-chat-feedback-description {
  display: none;
  margin: 0 0 10px;
  color: var(--hf-color-muted);
  font-size: 10px;
  line-height: 1.45;
}

.random-chat-feedback-description.is-visible {
  display: block;
}

.random-chat-feedback-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
  padding: 3px 5px;
  background: transparent;
  border: 0;
  color: var(--hf-color-muted);
  font-size: 11px;
  line-height: 1.5;
  cursor: pointer;
}

.random-chat-feedback-toggle:disabled {
  opacity: 1;
  cursor: default;
}

.random-chat-feedback-toggle.is-submitted {
  color: var(--hf-color-success);
}

.random-chat-feedback-toggle-arrow {
  min-width: 10px;
  color: var(--hf-color-muted-light);
}

.random-chat-feedback-panel {
  display: none;
}

.random-chat-feedback-panel.is-visible {
  display: block;
}

.random-chat-feedback-step {
  display: none;
  opacity: 0;
  transform: translateY(4px);
}

.random-chat-feedback-step.is-active {
  display: block;
  animation: random-chat-feedback-step-in 150ms ease-out forwards;
}

@keyframes random-chat-feedback-step-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.random-chat-feedback-primary {
  margin-top: 0;
}

.random-chat-feedback-step-reasons {
  margin: 0 auto;
}

.random-chat-feedback-reasons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.random-chat-feedback-btn,
.random-chat-feedback-reason {
  padding: 5px 11px;
  background-color: var(--hf-color-surface);
  border: 1px solid var(--hf-color-primary-border);
  border-radius: 7px;
  color: var(--hf-color-primary-text);
  font-size: 11px;
  line-height: 1.4;
  cursor: pointer;
}

.random-chat-feedback-btn {
  min-width: 112px;
}

.random-chat-feedback-reason {
  width: 100%;
  min-height: 40px;
  padding: 5px 12px;
  color: var(--hf-color-text);
  border-color: var(--hf-color-line-strong);
  text-align: left;
}

.random-chat-feedback-back {
  margin-top: 8px;
  padding: 3px 6px;
  background: transparent;
  border: 0;
  color: var(--hf-color-muted);
  font-size: 10px;
  line-height: 1.4;
  cursor: pointer;
}

.random-chat-feedback-btn:disabled,
.random-chat-feedback-reason:disabled,
.random-chat-feedback-back:disabled,
.random-chat-block-btn:disabled,
.random-chat-main-btn:disabled,
.random-chat-community-link:disabled {
  opacity: 0.55;
  cursor: default;
}

.random-chat-feedback-status {
  margin: 0;
  color: var(--hf-color-muted);
  font-size: 10px;
}

.random-chat-feedback-status:not(:empty) {
  margin-top: 8px;
}

.random-chat-community-link,
.random-chat-block-btn,
.random-chat-main-btn {
  padding: 2px 3px;
  background: transparent;
  border: 0;
  color: var(--hf-color-muted);
  font-size: 11px;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

.random-chat-block-btn {
  color: var(--hf-color-danger-hover);
}

.random-chat-secondary-actions {
  margin-top: 24px;
  gap: 7px;
  color: var(--hf-color-muted-light);
}

.random-chat-block-modal-card {
  padding: 0;
}

.random-chat-block-modal-step {
  display: none;
}

.random-chat-block-modal-step.is-active {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.random-chat-block-modal-step h2 {
  margin: 0 38px 5px 0;
  color: var(--hf-color-text-strong);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
}

.random-chat-block-modal-step .hf-modal-header > p {
  margin: 0 0 18px;
  color: var(--hf-color-muted);
  font-size: 12px;
  line-height: 1.55;
}

.random-chat-block-modal-options {
  display: grid;
  gap: 9px;
}

.random-chat-block-option {
  display: block;
  width: 100%;
  padding: 13px 14px;
  color: var(--hf-color-text);
  background: var(--hf-color-surface-soft);
  border: 1px solid var(--hf-color-line);
  border-radius: 9px;
  text-align: left;
  cursor: pointer;
}

.random-chat-block-option.is-report {
  color: var(--hf-color-danger-hover);
  background: var(--hf-color-danger-soft);
  border-color: var(--hf-color-danger);
}

.random-chat-block-option strong,
.random-chat-block-option span {
  display: block;
}

.random-chat-block-option strong {
  margin-bottom: 3px;
  font-size: 13px;
  font-weight: 800;
}

.random-chat-block-option span {
  color: var(--hf-color-muted);
  font-size: 11px;
  line-height: 1.45;
}

.random-chat-block-modal.is-submitting button {
  opacity: 0.58;
  cursor: default;
}

@media (hover: hover) and (pointer: fine) {
  .random-chat-feedback-toggle:hover,
  .random-chat-feedback-back:hover,
  .random-chat-community-link:hover,
  .random-chat-block-btn:hover,
  .random-chat-main-btn:hover {
    text-decoration: underline;
  }

  .random-chat-feedback-btn:hover,
  .random-chat-feedback-reason:hover {
    background-color: var(--hf-control-selected-hover-bg);
    border-color: var(--hf-control-selected-border);
  }

  .random-chat-block-option:hover {
    background: var(--hf-color-primary-soft-hover);
    border-color: var(--hf-color-primary-border);
  }

  .random-chat-block-option.is-report:hover {
    background: var(--hf-color-danger-soft);
    border-color: var(--hf-color-danger);
  }
}

/* 채팅 메시지 */
.msg_wrap {
  padding: 4px 0 6px;
  overflow: hidden;
}

.send_box,
.receive_box {
  box-sizing: border-box;
  max-height: 100%;
  padding: 8px 11px;

  border: 0;
  box-shadow: none;

  font-size: 13px;
  line-height: 1.45;

  word-break: normal;
  overflow-wrap: anywhere;
}

/* 내가 보낸 메시지 */
.send_box {
  float: right;

  background-color: var(--hf-chat-bubble-mine-bg);
  color: var(--hf-chat-bubble-mine-text);

  border: 1px solid var(--hf-chat-bubble-mine-bg);
  border-radius: 12px 12px 4px 12px;
}

/* 상대가 보낸 메시지 */
.receive_box {
  float: left;

  background-color: var(--hf-chat-bubble-peer-bg);
  color: var(--hf-chat-bubble-peer-text);

  border-radius: 12px 12px 12px 4px;
}

/* 1:1 상대 표시 라벨. chat_ui.css가 grouping visibility만 소유한다. */
.msg_nickname_wrap {
  display: block;
  margin: 0 0 3px 2px;
  color: #727b83;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
  }
}

.find-user,
.random-chat-community-link {
  border-radius: 8px;
}

.profile-settings-modal.is-required .profile-settings-close {
  display: none;
}

.matching-settings-card {
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  color: var(--hf-color-text-strong);
}

.matching-settings-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding-right: 34px;
}

.profile-settings-modal.is-required .matching-settings-heading {
  padding-right: 0;
}

.matching-settings-icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--hf-color-primary-text);
  background: var(--hf-color-primary-soft);
  border-radius: 50%;
  font-size: 19px;
}

.matching-settings-heading-text {
  min-width: 0;
}

.matching-settings-heading h2 {
  margin: 0;
  color: var(--hf-color-text-strong);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.35;
}

.matching-settings-heading p {
  margin: 5px 0 0;
  color: var(--hf-color-muted);
  font-size: 13px;
  line-height: 1.5;
}

.matching-settings-fieldset + .matching-settings-fieldset {
  margin-top: 20px;
}

.matching-settings-recaptcha-wrap {
  display: flex;
  min-height: 82px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 14px;
  overflow: hidden;
  background: var(--hf-color-surface-soft);
  border: 1px solid var(--hf-color-line);
  border-radius: 10px;
}

#matching_settings_recaptcha {
  max-width: 100%;
}

#matching_settings_recaptcha.is-verified {
  opacity: 0.78;
}

.matching-settings-recaptcha-status {
  margin: 9px 0 0;
  color: var(--hf-color-muted);
  font-size: 11px;
  line-height: 1.45;
}

.matching-settings-recaptcha-status.is-success {
  color: var(--hf-color-success);
  font-weight: 700;
}

.matching-settings-recaptcha-status.is-error {
  color: var(--hf-color-danger-hover);
}

.matching-settings-label {
  display: block;
  margin-bottom: 9px;
  color: var(--hf-color-text-strong);
  font-size: 13px;
  font-weight: 700;
}

.matching-settings-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  outline: none;
}

.matching-settings-option {
  min-height: 40px;
  padding: 0 15px;
  color: var(--hf-color-text);
  background: var(--hf-color-surface);
  border: 1px solid var(--hf-color-line);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.matching-settings-option.is-selected {
  color: var(--hf-control-selected-text);
  background: var(--hf-control-selected-bg);
  border-color: var(--hf-control-selected-border);
  box-shadow: inset 0 0 0 1px var(--hf-focus-ring);
}

.matching-settings-actions {
  display: flex;
  margin-top: 24px;
}

.matching-settings-save {
  width: 100%;
  min-height: 44px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--hf-color-primary);
  border: 1px solid var(--hf-color-primary);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.matching-settings-save:disabled {
  color: var(--hf-control-disabled-text);
  background: var(--hf-control-disabled-bg);
  border-color: var(--hf-control-disabled-border);
  cursor: default;
}

.matching-settings-note {
  margin: 11px 0 0;
  color: var(--hf-color-muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  word-break: keep-all;
}

@media (hover: hover) and (pointer: fine) {
  .matching-settings-option:hover {
    color: var(--hf-control-selected-text);
    background: var(--hf-control-selected-hover-bg);
    border-color: var(--hf-control-selected-border);
  }

  .matching-settings-save:not(:disabled):hover {
    background: var(--hf-color-primary-hover);
    border-color: var(--hf-color-primary-hover);
  }
}

@media (max-width: 768px) {
  .matching-settings-heading {
    align-items: flex-start;
    margin-bottom: 18px;
    padding-right: 32px;
  }

  .matching-settings-icon {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }

  .matching-settings-heading h2 {
    font-size: 17px;
  }

  .matching-settings-heading p {
    font-size: 12px;
  }

  .matching-settings-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .matching-settings-age-options .matching-settings-option:last-child {
    grid-column: 1 / -1;
  }

  .matching-settings-option {
    width: 100%;
    min-height: 42px;
    padding: 0 8px;
    font-size: 12px;
  }

  .matching-settings-recaptcha-wrap {
    padding: 10px;
  }

  #matching_settings_recaptcha {
    transform: scale(0.88);
    transform-origin: left top;
    margin-bottom: -9px;
  }

  .matching-settings-actions {
    margin-top: 20px;
  }

  .matching-settings-note {
    font-size: 10px;
  }
}
