/* grouppurchase.css - 단체구매신청 페이지 스타일 */

/* 전체 페이지 컨테이너 */
.sub-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

/* 페이지 헤더 */
.page-header {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: #000;
  margin: 0;
}

/* 폼 섹션 */
.form-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-header {
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #000;
  margin: 0;
}

.section-title .required-mark {
  color: #e74c3c;
  margin-right: 5px;
}

/* 도서 선택 섹션 */
.book-selection-section {
  background: #f8f8f8;
}

.book-selection-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.book-search-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.book-search-wrapper .book-input-group {
  flex: 1;
  min-width: 300px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.book-search-wrapper .quantity-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.book-search-wrapper .btn-add-book {
  flex-shrink: 0;
}

.book-search-input-wrapper {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.book-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.book-search-results.show {
  display: block;
}

.book-search-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s ease;
}

.book-search-item:hover {
  background: #f8f9fa;
}

.book-search-item.selected {
  background: #e7f3ff;
  border-left: 3px solid #073d38;
}

.book-search-item:last-child {
  border-bottom: none;
}

.book-search-item-image {
  width: 80px;
  height: auto;
  object-fit: cover;
  border: 1px solid #ddd;
  border-radius: 4px;
  flex-shrink: 0;
}

.book-search-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.book-search-item-title {
  font-size: 0.95em;
  font-weight: 600;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}

.book-search-item-author {
  font-size: 0.95em;
  color: #666;
  margin: 0;
}

.book-search-item-price {
  font-size: 0.95em;
  font-weight: 600;
  color: #073d38;
  margin: 0;
}

.selected-books-list {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #ddd;
}

.selected-book-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 10px;
}

.selected-book-item-image {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border: 1px solid #ddd;
  border-radius: 4px;
  flex-shrink: 0;
}

.selected-book-item-info {
  flex: 1;
  min-width: 0;
}

.selected-book-item-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.selected-book-item-author {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.selected-book-item-price {
  font-size: 15px;
  font-weight: 600;
  color: #073d38;
}

.selected-book-item-quantity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.selected-book-item-quantity-label {
  font-size: 14px;
  color: #666;
}

.selected-book-item-quantity-value {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.selected-book-item-remove {
  padding: 8px 15px;
  font-size: 14px;
  color: #fff;
  background: #dc3545;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.selected-book-item-remove:hover {
  background: #c82333;
}

.selected-books-empty {
  text-align: center;
  padding: 30px;
  color: #999;
  font-size: 14px;
}

.book-input-group {
  flex: 1;
  min-width: 300px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.book-label {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  flex-shrink: 0;
  min-width: 80px;
}

.book-input {
  flex: 1;
}

.quantity-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.btn-quantity {
  width: 28px;
  height: 28px;
  font-size: 16px;
  font-weight: 700;
  color: #333;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.btn-quantity:hover {
  background: #f0f0f0;
  border-color: #333;
}

.btn-quantity:active {
  transform: scale(0.95);
}

.quantity-input {
  width: 60px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  padding: 6px;
}

.btn-add-book {
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: #333;
  border: 1px solid #333;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-add-book:hover {
  background: #555;
  border-color: #555;
  transform: translateY(-1px);
}

.btn-add-book:active {
  transform: translateY(0);
}

.book-add-notice {
  margin-top: 15px;
  font-size: 13px;
  color: #666;
  margin-bottom: 0;
}

/* 폼 그룹 */
.form-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.form-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-label {
  flex: 0 0 180px;
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  padding-right: 20px;
}

.label-text {
  display: inline-block;
}

.required-mark {
  color: #e74c3c;
  margin-left: 4px;
  font-weight: 700;
}

.input-wrapper {
  flex: 1;
}

/* 입력 필드 */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 15px;
  font-size: 14px;
  color: #333;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #333;
  box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #999;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

/* 전화번호 입력 */
.tel-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tel-input {
  flex: 0 0 90px;
  max-width: 90px;
  width: 90px;
  text-align: center;
  min-width: 0;
}

.tel-separator {
  font-size: 16px;
  color: #666;
  flex-shrink: 0;
  padding: 0 2px;
}

/* 우편번호 입력 */
.postcode-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.postcode-input {
  flex: 0 0 200px;
  max-width: 200px;
}

.btn-postcode {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #333;
  border: 1px solid #333;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-postcode:hover {
  background: #555;
  border-color: #555;
  transform: translateY(-1px);
}

.btn-postcode:active {
  transform: translateY(0);
}

/* 라디오 그룹 */
.radio-group {
  display: flex;
  gap: 30px;
  align-items: center;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.radio-input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #333;
}

.radio-label span {
  user-select: none;
}

/* 폼 액션 버튼 */
.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  padding-top: 30px;
}

.btn-submit {
  padding: 15px 60px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: #c41e3a;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-submit:hover {
  background: #a01a2e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.btn-submit:active {
  transform: translateY(0);
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
  .form-label {
    flex: 0 0 160px;
  }
}

@media (max-width: 768px) {
  .sub-inner {
    padding: 15px;
  }

  .page-title {
    font-size: 24px;
  }

  .form-section {
    padding: 20px;
    margin-bottom: 20px;
  }

  .section-title {
    font-size: 18px;
  }

  .book-selection-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .book-input-group {
    min-width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .book-label {
    min-width: auto;
  }

  .quantity-group {
    width: 100%;
    justify-content: center;
  }

  .btn-add-book {
    width: 100%;
  }

  .form-group {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 20px;
    padding-bottom: 20px;
  }

  .form-label {
    flex: none;
    margin-bottom: 10px;
    padding-right: 0;
    font-size: 15px;
  }

  .tel-inputs {
    flex-direction: row;
    gap: 5px;
  }

  .tel-input {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    padding: 10px 8px;
  }

  .tel-input:first-of-type {
    flex: 0 0 70px;
    max-width: 70px;
  }

  .tel-input:nth-of-type(2),
  .tel-input:nth-of-type(3) {
    flex: 0 0 85px;
    max-width: 85px;
  }

  .tel-separator {
    display: inline;
    font-size: 14px;
    padding: 0;
  }

  .postcode-inputs {
    flex-direction: column;
    gap: 10px;
  }

  .postcode-input {
    flex: 1;
    max-width: 100%;
    width: 100%;
  }

  .btn-postcode {
    width: 100%;
    padding: 12px 20px;
  }

  .radio-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .btn-submit {
    width: 100%;
    padding: 15px 40px;
  }
}

@media (max-width: 480px) {
  .sub-inner {
    padding: 10px;
  }

  .page-title {
    font-size: 20px;
  }

  .form-section {
    padding: 15px;
  }

  .section-title {
    font-size: 16px;
  }

  .form-label {
    font-size: 14px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    padding: 10px 12px;
    font-size: 14px;
  }

  .btn-quantity {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .quantity-input {
    width: 70px;
  }

  .btn-add-book {
    padding: 10px 20px;
    font-size: 15px;
  }

  .btn-submit {
    padding: 12px 30px;
    font-size: 16px;
  }

  .tel-input:first-of-type {
    flex: 0 0 60px;
    max-width: 60px;
  }

  .tel-input:nth-of-type(2),
  .tel-input:nth-of-type(3) {
    flex: 0 0 75px;
    max-width: 75px;
  }

  .tel-separator {
    font-size: 12px;
  }
}
