/* SHINHA Form Tools — Form Panel */
.form-panel {
  background: #fff;
  border-right: 1px solid #dde1e8;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.form-panel__header {
  padding: 12px 16px;
  border-bottom: 1px solid #eef0f4;
  font-weight: 700;
  font-size: 15px;
  color: #1a4b8c;
  flex-shrink: 0;
}

.form-panel__hint {
  margin: 0;
  padding: 8px 16px 0;
  font-size: 12px;
  color: #5a6270;
  line-height: 1.4;
  flex-shrink: 0;
}

.form-panel__content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px 24px;
  -webkit-overflow-scrolling: touch;
  /* Prevent tall form descendants from expanding document scrollHeight (Chromium). */
  contain: layout;
}

.recruitment-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-section {
  border: 1px solid #eef0f4;
  border-radius: 8px;
  padding: 0;
  margin: 0;
}

.form-section--collapsible {
  overflow: hidden;
}

.form-section--collapsible > .form-section__title {
  cursor: pointer;
  padding: 10px 14px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-section--collapsible > .form-section__title::-webkit-details-marker {
  display: none;
}

.form-section--collapsible > .form-section__title::after {
  content: "▾";
  font-size: 12px;
  color: #888;
  transition: transform 0.15s;
}

.form-section--collapsible:not([open]) > .form-section__title::after {
  transform: rotate(-90deg);
}

.form-section--collapsible > .form-section__fields {
  padding: 0 14px 14px;
}

.form-section__title {
  font-size: 13px;
  font-weight: 700;
  color: #1a4b8c;
  padding: 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-section--template {
  padding: 14px 14px 16px;
  margin-bottom: 14px;
  background: #ffffff;
  border: 1px solid #e5eaf0;
  border-radius: 10px;
}

.form-section--template .form-section__fields {
  margin-top: 0;
}

.form-section-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: #0f2a4a;
}

.form-section-desc {
  margin: 0 0 12px;
  font-size: 12px;
  color: #5a6270;
  line-height: 1.4;
}

.form-section--template .form-field {
  margin-bottom: 12px;
}

.form-section--template .form-field:last-child {
  margin-bottom: 0;
}

.form-section--template .form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
}

.form-section--template .form-input,
.form-section--template textarea.form-input,
.form-section--template select.form-input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  font-size: 13px;
  color: #111827;
  background: #ffffff;
  box-sizing: border-box;
}

.form-section--template textarea.form-input {
  resize: vertical;
  line-height: 1.45;
}

.form-field[data-field-key="highlightNote"] textarea.form-input {
  min-height: 84px;
}

.form-sections--template {
  gap: 0;
}

.form-section__fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.form-input {
  width: 100%;
  padding: 8px 10px;
  min-height: 42px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #ccd2da;
  border-radius: 6px;
  background: #fff;
  color: #1a1a2e;
  transition: border-color 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: #1a4b8c;
  box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.12);
}

.form-input:disabled {
  background: #f5f6f8;
  cursor: not-allowed;
}

textarea.form-input {
  resize: vertical;
  min-height: 72px;
}

select.form-input {
  cursor: pointer;
}

.form-hint {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
  color: #8A94A3;
  margin: 4px 0 0;
}

.logo-field-help,
.logo-upload .form-hint {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
  color: #8A94A3;
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 0 8px;
  border-top: 1px solid #eef0f4;
  margin-top: 16px;
  background: #fff;
  align-items: stretch;
}

/* Desktop: action footer pinned to form column bottom (outside scroll content) */
.form-panel > .form-actions {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 12px 16px 16px;
  position: static;
}

.form-actions .btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  text-align: center;
}

.form-actions .btn-sm {
  padding: 8px 14px;
  font-size: 14px;
}

.form-actions .btn-primary,
.form-actions .btn-remember-data {
  grid-column: 1 / -1;
  width: 100%;
  margin-left: 0;
}

/* Logo upload in form */
.logo-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.logo-upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.logo-upload__label {
  align-self: flex-start;
  cursor: pointer;
}

.logo-upload__thumb {
  width: 80px;
  height: 56px;
  border: 1px dashed #ccd2da;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f8f9fb;
}

.logo-upload__thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-size-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.logo-size-controls__btn {
  min-height: 36px;
}

.logo-size-controls__btn--remove {
  color: #b42318;
  border-color: #f3c4c0;
  background: #fff7f6;
}

.logo-size-controls__btn--remove:hover,
.logo-size-controls__btn--remove:focus {
  color: #912018;
  border-color: #e8a39c;
  background: #ffefed;
}

.logo-size-controls__label {
  font-size: 13px;
  font-weight: 700;
  color: #1a4b8c;
  min-width: 48px;
  text-align: center;
}

.form-field__custom-wrap {
  margin-top: 8px;
}

.form-custom-input {
  margin-top: 8px;
}

.form-quick-tags,
.form-presets,
.form-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.form-tag-button,
.form-preset-button {
  border: 1px solid #d7deea;
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.form-tag-button:hover,
.form-preset-button:hover {
  background: #eaf2ff;
  border-color: #2f6fbe;
  color: #064a9b;
}

.form-label--custom {
  font-size: 12px;
  color: #5a6270;
}

.btn-remember-data__short {
  display: none;
}

@media (max-width: 767px) {
  .btn-remember-data__full {
    display: none;
  }

  .btn-remember-data__short {
    display: inline;
  }
}

/* Color section in customize panel */
.color-section {
  border: 1px solid #eef0f4;
  border-radius: 8px;
  padding: 0;
  margin-top: 12px;
}

.color-section--collapsible > .color-section__title {
  cursor: pointer;
  padding: 10px 12px;
  list-style: none;
  font-size: 13px;
  font-weight: 700;
  color: #1a4b8c;
  text-transform: uppercase;
}

.color-section--collapsible > .color-section__title::-webkit-details-marker {
  display: none;
}

.color-section--collapsible > .color-section__title::after {
  content: " ▾";
  font-size: 11px;
  color: #888;
}

.color-section--collapsible:not([open]) > .color-section__title::after {
  content: " ▸";
}

.color-section--collapsible > #color-tools-panel,
.color-section--collapsible > div {
  padding: 0 12px 12px;
}

.color-section__title {
  font-size: 13px;
  font-weight: 700;
  color: #1a4b8c;
  margin: 0 0 10px;
  text-transform: uppercase;
}
