/* Write page form - BEM methodology with design from post_form_design */

/* Box sizing for the form */
.sbr2-form.sbr2-form--write *, 
.sbr2-form.sbr2-form--write *::before, 
.sbr2-form.sbr2-form--write *::after { 
  box-sizing: border-box; 
}

/* Main form container */
.sbr2-form.sbr2-form--write {
  padding: 60px 15px;
  margin: 0 auto;
  max-width: 1700px;
}

/* Error message */
.sbr2-form .sbr2-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 5px;
  margin-bottom: 20px;
  border: 1px solid #fecaca;
}

/* Fields container */
.sbr2-form .sbr2-form__fields {
  border-top: 3px solid #929292;
  border-bottom: 3px solid #FBFBFB;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Individual field */
.sbr2-form .sbr2-form__field {
  display: flex;
  align-items: center;
  border-bottom: 2px solid #F0F0F0;
  height: 85px;
  margin: 0;
  padding: 0;
}

/* Content field - taller */
.sbr2-form .sbr2-form__field--content {
  height: 410px;
}

/* File field - medium height */
.sbr2-form .sbr2-form__field--file {
  min-height: 150px;
  height: auto;
  /* Make children stretch to the row height so the label can match container height */
  align-items: stretch;
}
.sbr2-form .sbr2-form__field--file .sbr2-form__label {
  /* Ensure the label can stretch via flex instead of fixed height */
  height: auto;
}

/* Field label */
.sbr2-form .sbr2-form__label {
  width: 180px;
  background: #F4F7F9;
  padding: 0 20px;
  height: 100%;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 3px;
  color: #333;
  font-weight: 500;
  margin: 0;
}

/* Required asterisk */
.sbr2-form .sbr2-form__required {
  display: block;
  color: #ec2e41;
  font-size: 16px;
  margin-top: 6px;
}

/* Input wrapper */
.sbr2-form .sbr2-form__input-wrap {
  padding: 0 20px;
  width: calc(100% - 180px);
}

/* Regular text inputs */
.sbr2-form .sbr2-form__input {
  padding: 15px;
  border: 1px solid #E6E6E6;
  border-radius: 5px;
  width: 60%;
  font-size: 16px;
}

.sbr2-form .sbr2-form__input:focus {
  outline: none;
  border-color: #3871CC;
}

.sbr2-form .sbr2-form__input::placeholder {
  font-size: 16px;
  color: #999;
}

/* Writer name display */
.sbr2-form .sbr2-form__writer-name {
  font-size: 16px;
  margin: 0;
  color: #333;
}

/* (removed) password help text styles */

/* Content textarea (fallback when no WP editor) */
.sbr2-form .sbr2-form__textarea {
  width: 100%;
  resize: none;
  height: 300px;
  border: 1px solid #E6E6E6;
  border-radius: 5px;
  padding: 15px;
  font-size: 16px;
}

.sbr2-form .sbr2-form__textarea::placeholder {
  font-size: 16px;
  color: #999;
}

.sbr2-form .sbr2-form__textarea:focus {
  outline: none;
  border-color: #3871CC;
}

/* File upload section */
.sbr2-form .sbr2-form__input-wrap--file {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

/* Hide actual file input */
.sbr2-form .sbr2-form__file-input {
  position: absolute;
  width: 0;
  height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
}

/* File button style */
.sbr2-form .sbr2-form__file-button {
  display: block;
  width: 60%;
  max-width: 300px;
  border: 1px solid #E6E6E6;
  border-radius: 5px;
  cursor: pointer;
  padding: 12px 12px;
  font-size: 14px;
  background: white;
  transition: all 0.3s ease;
  text-align: center;
}

.sbr2-form .sbr2-form__file-button:hover {
  background: #f8f9fa;
  border-color: #3871CC;
}

/* Selected file names display */
.sbr2-form .sbr2-form__file-names {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sbr2-form .sbr2-form__file-names span {
  font-size: 14px;
  color: #666;
  padding: 5px 10px;
  background: #f8f9fa;
  border-radius: 3px;
  display: inline-block;
  max-width: fit-content;
}

/* Remove button for each file chip */
.sbr2-form .sbr2-form__file-names .sbr2-file-remove {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  margin-left: 8px;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}
.sbr2-form .sbr2-form__file-names .sbr2-file-remove:hover {
  color: #dc2626;
}

/* File info text */
.sbr2-form .sbr2-form__file-info {
  font-size: 16px;
  color: #5ba3c2;
}

/* Buttons container */
.sbr2-form .sbr2-form__buttons {
  display: flex;
  justify-content: flex-end;
  padding-top: 60px;
  gap: 10px;
}

/* Button styles */
.sbr2-form .sbr2-form__button {
  font-size: 17px;
  text-align: center;
  display: block;
  padding: 18px 10px;
  width: 150px;
  border-radius: 5px;
  font-weight: 500;
  transition: .3s ease-in-out;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.sbr2-form .sbr2-form__button:hover {
  box-shadow: rgba(0, 0, 0, 0.15) 0px 1px 10px 0px;
}

/* Cancel button */
.sbr2-form .sbr2-form__button--cancel {
  border: 1px solid #D8D8D8;
  background: white;
  color: #333;
}

/* Submit button */
.sbr2-form .sbr2-form__button--submit {
  border: 1px solid #3871CC;
  background: #3871CC;
  color: #fff;
}

/* WordPress Editor specific styles - minimal to respect WP defaults */
.sbr2-form .sbr2-form__input-wrap--content .wp-editor-wrap {
  width: 100%;
}

/* Responsive styles */
@media all and (max-width: 1158px) {
  /* removed password field-specific tweaks */
  
  .sbr2-form .sbr2-form__input {
    width: 100%;
  }
  
  .sbr2-form .sbr2-form__file-button {
    width: 100%;
    max-width: none;
  }
}

@media all and (max-width: 768px) {
  .sbr2-form .sbr2-form__field {
    flex-direction: column;
    height: auto;
    min-height: 100px;
  }
  
  .sbr2-form .sbr2-form__field--content {
    height: auto;
    min-height: 400px;
  }
  
  .sbr2-form .sbr2-form__field--file {
    height: auto;
    min-height: 180px;
  }
  /* Keep label fixed height on mobile, even for file field */
  .sbr2-form .sbr2-form__field--file .sbr2-form__label {
    height: 50px;
  }
  
  .sbr2-form .sbr2-form__label {
    width: 100%;
    height: 50px;
    padding: 0 15px;
  }
  
  .sbr2-form .sbr2-form__input-wrap {
    width: 100%;
    padding: 15px;
  }
  
  .sbr2-form .sbr2-form__buttons {
    padding-top: 30px;
    justify-content: center;
  }
  
  .sbr2-form .sbr2-form__button {
    width: 120px;
    padding: 15px 10px;
    font-size: 15px;
  }
}

/* -------------------------------------------------------------------------- */
/* Appraisal write form skin (from 게시글_작성_폼_디자인.html) */
/* -------------------------------------------------------------------------- */

.sbr2-form.sbr2-form--appraisal {
  max-width: 1000px;
  padding: 20px;
}

.sbr2-form--appraisal .sbr2-form__privacy {
  background-color: #f9f9f9;
  padding: 20px;
  margin-bottom: 30px;
  font-size: 13px;
  border: 1px solid #eee;
}

.sbr2-form--appraisal .sbr2-form__privacy-content h3 {
  font-size: 14px;
  margin: 0 0 10px 0;
  font-weight: bold;
}

.sbr2-form--appraisal .sbr2-form__privacy-content ul {
  list-style: none;
  margin: 0 0 15px 0;
  padding: 0;
  color: #555;
}

.sbr2-form--appraisal .sbr2-form__privacy-content ul li::before {
  content: "•";
  margin-right: 5px;
  color: #555;
}

.sbr2-form--appraisal .sbr2-form__privacy-check {
  display: flex;
  align-items: center;
  font-size: 12px;
}

.sbr2-form--appraisal .sbr2-form__privacy-label input {
  margin-right: 6px;
}

.sbr2-form--appraisal .sbr2-form__table {
  border-top: 2px solid #000;
  border-bottom: 1px solid #ddd;
}

.sbr2-form--appraisal .sbr2-form__row {
  display: flex;
  border-bottom: 1px solid #eee;
  min-height: 60px;
}

.sbr2-form--appraisal .sbr2-form__label {
  width: 180px;
  background-color: #fbf6fa;
  display: flex;
  align-items: center;
  padding: 20px;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  margin: 0;
}

.sbr2-form--appraisal .sbr2-form__required {
  color: #d9534f;
  margin-right: 4px;
  margin-top: 0;
  display: inline-block;
}

.sbr2-form--appraisal .sbr2-form__input {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background-color: #fff;
  flex-wrap: wrap;
  gap: 10px;
}

.sbr2-form--appraisal .sbr2-form__checkbox-group {
  display: flex;
  gap: 20px;
}

.sbr2-form--appraisal .sbr2-form__checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.sbr2-form--appraisal .sbr2-form__checkbox-label input {
  margin-right: 6px;
  accent-color: #9c2e7a;
  width: 16px;
  height: 16px;
}

.sbr2-form--appraisal .sbr2-form__checkbox-label input:disabled {
  cursor: not-allowed;
}

.sbr2-form--appraisal .sbr2-form__control {
  height: 40px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 2px;
  width: 300px;
  font-size: 14px;
}

.sbr2-form--appraisal .sbr2-form__textarea {
  width: 100%;
  height: 200px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 2px;
  resize: vertical;
  font-family: inherit;
}

.sbr2-form--appraisal .sbr2-form__helper {
  color: #999;
  font-size: 13px;
}

.sbr2-form--appraisal .sbr2-form__buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  padding-top: 0;
}

.sbr2-form--appraisal .sbr2-form__button {
  width: 180px;
  height: 50px;
  padding: 0;
  border: 1px solid #ccc;
  background-color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  border-radius: 2px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sbr2-form--appraisal .sbr2-form__button--cancel:hover {
  background-color: #f5f5f5;
}

.sbr2-form--appraisal .sbr2-form__button--submit {
  background-color: #9c2e7a;
  color: #fff;
  border-color: #9c2e7a;
}

.sbr2-form--appraisal .sbr2-form__button--submit:hover {
  background-color: #7d2461;
}

.sbr2-form--appraisal .sbr2-field-error {
  border-color: #dc2626 !important;
  outline: none;
}

@media all and (max-width: 768px) {
  .sbr2-form.sbr2-form--appraisal {
    padding: 15px;
  }

  .sbr2-form--appraisal .sbr2-form__row {
    flex-direction: column;
  }

  .sbr2-form--appraisal .sbr2-form__label {
    width: 100%;
    padding: 12px 15px;
  }

  .sbr2-form--appraisal .sbr2-form__input {
    padding: 12px 15px;
  }

  .sbr2-form--appraisal .sbr2-form__control {
    width: 100% !important;
  }
}
