/* ========================================================
 * 버튼 스타일 (head_style_0018.css에서 이동, 2025-10-02)
 * Phase 2.2g: 모든 버튼 컴포넌트 통합
 * ======================================================== */

/* ============================================================
 * 1. 전송 버튼
 * ============================================================ */

.send-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
}

.send-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================
 * 2. 뒤로가기 버튼
 * ============================================================ */

.back-button-container {
  margin-top: 40px;
}

.back-btn {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 24px;
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back-btn:hover {
  background: var(--bg-chat);
  border-color: var(--primary-color);
}

/* ============================================================
 * 4. 모바일 햄버거 메뉴 버튼
 * ============================================================ */

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 10000;
  width: 44px;
  height: 44px;
  background: var(--primary-color);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
}

/* 기본적으로 햄버거 버튼 숨김 */
.mobile-menu-btn {
  display: none !important;
}

.mobile-menu-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.mobile-menu-btn:active {
  transform: translateY(0);
}

/* 햄버거 아이콘 애니메이션 */
.mobile-menu-btn.active {
  background: var(--error-color);
  color: white !important;
}

.mobile-menu-btn .hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 20px;
  height: 14px;
}

.mobile-menu-btn .hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.mobile-menu-btn.active .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .hamburger span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================================================
 * 5. 옵션 버튼 (채팅 옵션용)
 * ============================================================ */

.option-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
  animation: slideUp 0.3s ease;
}

.option-button:hover {
  border-color: var(--primary-color);
  background: var(--bg-chat);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 200, 0, 0.15);
}

.option-button:active {
  transform: translateY(0);
}

.option-button .option-emoji {
  font-size: 20px;
  min-width: 24px;
  text-align: center;
}

.option-button .option-text {
  flex: 1;
  line-height: 1.4;
}

.option-button .option-arrow {
  color: var(--text-secondary);
  font-size: 12px;
  opacity: 0.6;
}

/* 다크모드 버튼 스타일 */
[data-theme="dark"] .option-button {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .option-button:hover {
  background: var(--bg-chat);
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(47, 217, 38, 0.2);
}

/* 애니메이션 딜레이 */
.option-button:nth-child(1) { animation-delay: 0.1s; }
.option-button:nth-child(2) { animation-delay: 0.2s; }
.option-button:nth-child(3) { animation-delay: 0.3s; }
.option-button:nth-child(4) { animation-delay: 0.4s; }

/* ============================================================
 * 6. 컴팩트 버튼
 * ============================================================ */

.compact-btn {
  padding: 6px 12px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-color) !important;
  min-height: 32px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  white-space: nowrap;
}

.compact-btn:hover {
  background: var(--primary-color) !important;
  color: white !important;
  border-color: var(--primary-color) !important;
  transform: translateY(-1px);
}

.compact-btn .option-text {
  font-size: 13px;
  line-height: 1.2;
}

/* ============================================================
 * 7. 기타 입력 버튼 (커스텀 입력용)
 * ============================================================ */

.other-input {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border: none !important;
  font-weight: 500;
  min-width: 140px;
}

.other-input:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 웹소설 옵션용 기타 입력 버튼 */
.novel-option.other-input {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  margin-top: 8px;
  width: 100%;
}

.novel-option.other-input:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
}

/* ============================================================
 * 8. 커스텀 입력 모달 버튼
 * ============================================================ */

.custom-input-buttons {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: flex-end;
}

.custom-input-buttons button {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-input-buttons button:first-child {
  background: var(--primary-color);
  color: white;
}

.custom-input-buttons button:first-child:hover {
  background: var(--primary-dark);
}

.custom-input-buttons button:last-child {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.custom-input-buttons button:last-child:hover {
  background: var(--border-color);
}

/* ============================================================
 * 9. 프리미엄 서비스 버튼
 * ============================================================ */

.premium-service-btn {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  padding: 16px 20px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.premium-service-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ============================================================
 * 10. 패널 닫기 버튼
 * ============================================================ */

.close-panel-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-panel-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================================
 * 11. 만세력/사주 페이지 닫기 버튼
 * ============================================================ */

.close-saju-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s;
}

.close-saju-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================================
 * 12. 모달 닫기 버튼
 * ============================================================ */

.modal-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}
