/* Rev 3 (2026-10) — forms 영역 전용 스타일 (Partner / Assignment 등록폼·보기). 이 영역 담당 작업만 수정할 것(.ai/REV3_SCOPE.md 참고).
   기존 style.css 는 건드리지 않고, 더 구체적인 선택자(.rev3-form …)로 덮어쓴다. */

/* ---------- 공통 유틸 ---------- */
.rev3-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rev3-form [hidden] {
  display: none !important;
}

/* ---------- 상단 안내문 ---------- */
.rev3-form .rev3-intro .text {
  font-size: 18px;
  line-height: 1.6;
}

@media all and (max-width: 600px) {
  .rev3-form .rev3-intro .text {
    font-size: 12px;
  }
}

.rev3-form .rev3-intro {
  margin-bottom: 40px;
}

@media all and (max-width: 600px) {
  .rev3-form .rev3-intro {
    margin-bottom: 20px;
  }
}

/* ---------- 필드 배치 ---------- */
/* 목업의 좁은 한 칸 입력: 한 줄에 최대 4칸(.row-item)이라 기본 폭을 그대로 쓴다.
   혼자 한 줄을 쓰는 입력칸(안내문이 긴 질문, textarea)은 절반 폭까지만. */
.rev3-form .rev3-half {
  max-width: 640px;
}

.rev3-form .rev3-wide {
  max-width: 100%;
}

.rev3-form .row-line .row-item.rev3-w-wide {
  flex: 1 1 calc(37.5% - 22.5px);
  max-width: calc(37.5% - 22.5px);
}

@media all and (max-width: 1200px) {
  .rev3-form .row-line .row-item.rev3-w-wide {
    flex: 1 1 calc(33% - 17px);
    max-width: calc(33% - 17px);
  }
}

@media all and (max-width: 1024px) {
  .rev3-form .row-line .row-item.rev3-w-wide {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* Rev 6 (R1): "Possible languages (Multiple selections allowed.)" — 안내 문구가 붙어 제목이 칸 폭(1025~1400px 에서 310~460px)보다 길어져
   두 줄로 꺾이면 옆 Language 칸과 상자 높이가 어긋난다. 한 줄을 유지한다(이 줄의 오른쪽은 비어 있어 넘쳐도 겹치지 않는다).
   1024px 이하는 칸이 한 줄에 하나씩 쌓여 어긋날 일이 없으므로 자연 줄바꿈. */
@media all and (min-width: 1025px) {
  .rev3-form #possible_languages-title span {
    white-space: nowrap;
  }
}

.rev3-form .form-item .label {
  flex-wrap: wrap;
}

.rev3-form .rev3-sublabel {
  margin-top: 26px;
}

.rev3-form .rev3-lead-label {
  display: block;
  width: 100%;
  margin-bottom: 7px;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.5;
}

@media all and (max-width: 600px) {
  .rev3-form .rev3-lead-label {
    font-size: 12px;
  }
}

.rev3-form .rev3-hint-above {
  display: block;
  margin: 0 0 8px;
}

/* 한 줄처럼 보이는 textarea (Professional license 등) — 길게 쓰면 늘어난다 */
.rev3-form textarea.inp.rev3-oneline {
  min-height: 50px;
  height: 50px;
  padding: 13px 21px;
  resize: vertical;
  overflow: hidden;
}

@media all and (max-width: 600px) {
  .rev3-form textarea.inp.rev3-oneline {
    min-height: 35px;
    height: 35px;
    padding: 7px 11px;
  }
}

/* 길게 쓰는 칸 (Needed local activity) */
.rev3-form textarea.inp.rev3-long {
  min-height: 150px;
  padding: 16px 21px;
  resize: vertical;
}

/* "라벨: [입력칸]" 한 줄 배치 (When is it needed?) */
.rev3-form .form-item.rev3-inline {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
}

.rev3-form .form-item.rev3-inline > .label {
  flex: 0 0 190px;
  width: 190px;
  margin-bottom: 0;
}

.rev3-form .form-item.rev3-inline > .form-inp {
  flex: 0 1 320px;
  width: auto;
}

@media all and (max-width: 600px) {
  .rev3-form .form-item.rev3-inline {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .rev3-form .form-item.rev3-inline > .label {
    flex: none;
    width: 100%;
  }

  .rev3-form .form-item.rev3-inline > .form-inp {
    flex: none;
    width: 100%;
  }
}

/* 목업에 없는 현재 필드(보존 블록, 마크업의 .rev3-extra) 간격 */
.rev3-form .form-list.rev3-extra {
  margin-bottom: 20px;
}

.rev3-form .rev3-extra .row-line + .row-line {
  margin-top: 10px;
}

/* select 안내 문구(첫 option) — 값이 비어 있을 때 흐리게 */
.rev3-form select.inp.rev3-select.is-empty {
  color: rgba(0, 0, 0, 0.5);
  font-weight: 300;
}

.rev3-form select.inp.rev3-select option {
  color: #000;
  font-weight: 400;
}

/* ---------- 복수선택 드롭다운 ---------- */
.rev3-form .form-item.rev3-ms-item {
  margin-top: 20px;
  margin-bottom: 20px;
}

.rev3-ms-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px 30px;
}

.rev3-ms {
  position: relative;
  flex: 0 1 380px;
  min-width: 260px;
}

.rev3-ms-other {
  flex: 1 1 470px;
  max-width: 640px;
  min-width: 260px;
}

.rev3-ms__field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rev3-ms__btnwrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.rev3-ms__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background-color: #fff;
  text-align: left;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
}

.rev3-ms__btn:focus-visible,
.rev3-form .inp:focus-visible {
  outline: 2px solid #158ba9;
  outline-offset: 2px;
}

.rev3-ms__text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rev3-ms__text.is-placeholder {
  color: rgba(0, 0, 0, 0.5);
  font-weight: 300;
}

.rev3-ms__caret {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  margin-left: 12px;
  background: url(../images/ico-select.png) center / 15px no-repeat;
  transition: transform 0.15s;
}

.rev3-ms.is-open .rev3-ms__caret {
  transform: rotate(180deg);
}

.rev3-ms__req {
  flex: 0 0 auto;
  margin-left: 0;
  font-size: 22px;
  line-height: 1;
}

.rev3-ms__panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: min(340px, 60vh);
  overflow-y: auto;
  padding: 6px 0;
  background: #fff;
  border: 1px solid #6b6b6b;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.rev3-ms.is-up .rev3-ms__panel {
  top: auto;
  bottom: calc(100% + 4px);
}

.rev3-ms__opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 18px;
  font-size: 16px;
  line-height: 1.3;
  color: #202425;
  cursor: pointer;
}

.rev3-ms__opt:hover,
.rev3-ms__opt:focus-within {
  background: #eefaff;
}

.rev3-ms__chk {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.rev3-ms__box {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  background: #fff center / 60% no-repeat;
  border: 1px solid #969696;
  border-radius: 4px;
}

.rev3-ms__chk:checked + .rev3-ms__box {
  background-image: url(../images/ico-check.svg);
}

.rev3-ms__chk:focus-visible + .rev3-ms__box {
  outline: 2px solid #158ba9;
  outline-offset: 2px;
}

.rev3-ms.is-invalid .rev3-ms__btn,
.rev3-form .rev3-ms__other[aria-invalid="true"] {
  border-color: #f52222;
}

.rev3-ms__error {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: #f52222;
}

/* 한 줄(.row-item) 안에 들어가는 복수선택(Possible languages) */
.rev3-form .row-item .rev3-ms-row {
  display: block;
}

.rev3-form .row-item .rev3-ms {
  flex: none;
  min-width: 0;
}

@media all and (max-width: 600px) {
  .rev3-ms-row {
    display: block;
  }

  .rev3-ms,
  .rev3-ms-other {
    min-width: 0;
  }

  .rev3-ms-other {
    margin-top: 10px;
  }

  .rev3-ms__opt {
    font-size: 14px;
  }
}

/* ---------- 버튼 3개 (Save / Cancel / 최종 제출) ---------- */
.rev3-form .rev3-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.rev3-form .form-agree-submit-wrap .rev3-actions .solid-btn {
  width: auto;
  max-width: none;
  min-width: 170px;
  height: 54px;
  padding: 0 30px;
  font-size: 20px;
  text-decoration: none;
}

.rev3-form .rev3-actions .solid-btn.rev3-btn-save {
  background-color: #fff;
  color: #158ba9;
  border: 2px solid #5ed7ff;
}

.rev3-form .rev3-actions .solid-btn.rev3-btn-save:hover {
  background-color: #eefaff;
}

.rev3-form .rev3-actions .solid-btn.rev3-btn-cancel {
  background-color: #fff;
  color: #4a4a4a;
  border: 2px solid #bbb;
}

.rev3-form .rev3-actions .solid-btn.rev3-btn-cancel:hover {
  background-color: #f3f3f3;
}

.rev3-form .rev3-actions .solid-btn.is-busy {
  opacity: 0.6;
  cursor: progress;
}

.rev3-form .rev3-actions .solid-btn:focus-visible {
  outline: 2px solid #158ba9;
  outline-offset: 3px;
}

@media all and (max-width: 600px) {
  .rev3-form .rev3-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .rev3-form .form-agree-submit-wrap .rev3-actions .solid-btn {
    width: 100%;
    height: 45px;
    font-size: 18px;
  }
}

.rev3-save-status {
  max-width: 640px;
  margin: 18px auto 0;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}

.rev3-save-status:empty {
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
}

.rev3-save-status.is-ok {
  background: #e8f7ee;
  color: #1d6b3a;
  border: 1px solid #b9e2c7;
}

.rev3-save-status.is-error {
  background: #fdecec;
  color: #b42318;
  border: 1px solid #f3b8b4;
}

.rev3-save-status.is-info {
  background: #eefaff;
  color: #0f5f78;
  border: 1px solid #bfe6f5;
}

@media all and (max-width: 600px) {
  .rev3-save-status {
    font-size: 13px;
  }
}

/* 업로드 안내문 — 새 문구 한 문단 */
.rev3-form .upload-caution {
  font-size: 16px;
  line-height: 1.5;
}

/* Rev 4 (슬라이드 37·42): 클라이언트가 지정한 위치의 줄바꿈(<br class="lb">)은 데스크톱(≥ 901px)에서만 강제하고,
   모바일은 자연 줄바꿈으로 둔다(홈·랜딩의 .lb 와 같은 방식). */
@media all and (max-width: 900px) {
  .rev3-form .lb {
    display: none;
  }
}

/* ---------- 보기(view.skin.php) — 읽기 전용 목록 ---------- */
.rev3-view {
  margin-bottom: 30px;
}

.rev3-view__sec {
  margin-bottom: 36px;
}

.rev3-view__title {
  margin-bottom: 14px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
}

.rev3-view dl {
  border-top: 1px solid #c8c8c8;
}

.rev3-view__row {
  display: grid;
  grid-template-columns: minmax(180px, 34%) 1fr;
  gap: 8px 24px;
  padding: 12px 4px;
  border-bottom: 1px solid #ededed;
}

.rev3-view dt {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
}

.rev3-view dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  word-break: break-word;
}

@media all and (max-width: 600px) {
  .rev3-view__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .rev3-view__title {
    font-size: 18px;
  }

  .rev3-view dt,
  .rev3-view dd {
    font-size: 13px;
  }
}
