/* ============================================
   components.css — 인터랙티브 컴포넌트
   법인설립지원센터 파트너스 Phase 8
   ============================================ */

/* ==========================================
   바텀시트 오버레이
   ========================================== */

.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-modal) - 10);
  background: rgba(7, 20, 44, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sheet-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================
   바텀시트
   ========================================== */

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-modal);
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(7, 20, 44, 0.15);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.bottom-sheet.is-open {
  transform: translateY(0);
}

@media (min-width: 769px) {
  .bottom-sheet {
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(100%);
    width: 480px;
    border-radius: 20px;
    bottom: 0;
    max-height: 90vh;
  }

  .bottom-sheet.is-open {
    transform: translateX(-50%) translateY(0);
  }
}

.bottom-sheet__handle {
  width: 40px;
  height: 4px;
  background: var(--color-gray-200);
  border-radius: 9999px;
  margin: 12px auto;
}

@media (min-width: 769px) {
  .bottom-sheet__handle {
    display: none;
  }
}

.bottom-sheet__header {
  position: relative;
  padding: 24px 24px 0;
}

.bottom-sheet__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-gray-900);
}

.bottom-sheet__subtitle {
  font-size: 14px;
  color: var(--color-gray-400);
  margin-top: 4px;
}

.bottom-sheet__close {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px;
  color: var(--color-gray-400);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.2s ease;
}

.bottom-sheet__close:hover {
  color: var(--color-gray-900);
}

.bottom-sheet__body {
  padding: 24px;
}

/* ==========================================
   신청 폼
   ========================================== */

.apply-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.apply-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.apply-form__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-900);
}

.apply-form__required {
  color: var(--color-primary);
}

.apply-form__input,
.apply-form__select {
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--color-gray-200);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--color-gray-900);
  background: #fff;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.apply-form__input::placeholder {
  color: var(--color-gray-400);
}

.apply-form__input:focus,
.apply-form__select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(57, 114, 223, 0.15);
  outline: none;
}

.apply-form__input.is-error,
.apply-form__select.is-error {
  border-color: var(--color-accent-red, #ef4444);
}

.apply-form__error {
  font-size: 12px;
  color: var(--color-accent-red, #ef4444);
  min-height: 16px;
  line-height: 1.4;
}

/* 셀렉트 래퍼 (화살표 아이콘) */
.apply-form__select-wrapper {
  position: relative;
}

.apply-form__select-wrapper::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239CA3AF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.apply-form__select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
}

/* ==========================================
   동의 체크박스
   ========================================== */

.apply-form__field--agree {
  gap: 0;
}

.apply-form__checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.apply-form__checkbox-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--color-gray-300);
  border-radius: 4px;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  position: relative;
}

.apply-form__checkbox:checked + .apply-form__checkbox-custom {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.apply-form__checkbox:checked + .apply-form__checkbox-custom::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.apply-form__agree-all {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-gray-100);
  cursor: pointer;
}

.apply-form__agree-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
}

.apply-form__agree-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.apply-form__agree-text {
  font-size: 13px;
  color: var(--color-gray-600);
  flex: 1;
}

.apply-form__agree-text--bold {
  font-weight: 600;
  color: var(--color-gray-900);
  font-size: 14px;
}

.apply-form__agree-view {
  font-size: 12px;
  color: var(--color-primary);
  text-decoration: underline;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

/* ==========================================
   제출 버튼 + 성공 메시지
   ========================================== */

.apply-form__submit {
  height: 52px;
  font-size: 16px;
  font-weight: 700;
}

.apply-form__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.apply-form__success {
  text-align: center;
  padding: 40px 20px;
}

.apply-form__success-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  line-height: 1;
}

.apply-form__success h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 8px;
}

.apply-form__success p {
  font-size: 14px;
  color: var(--color-gray-500);
  line-height: 1.7;
}

/* ==========================================
   이탈 방지 모달 오버레이
   ========================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-modal) - 10);
  background: rgba(7, 20, 44, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================
   이탈 방지 모달
   ========================================== */

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: var(--z-modal);
  background: #fff;
  border-radius: 20px;
  width: 90%;
  max-width: 440px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.modal.is-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  padding: 8px;
  color: rgba(255, 255, 255, 0.7);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.2s ease;
}

.modal__close:hover {
  color: #fff;
}

.modal__visual {
  background: var(--gradient-hero);
  padding: 40px 0;
  text-align: center;
  position: relative;
}

.modal__visual-bg {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__visual-icon {
  font-size: 60px;
  line-height: 1;
}

.modal__body {
  padding: 32px;
}

.modal__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  text-align: center;
  color: var(--color-gray-900);
}

@media (max-width: 768px) {
  .modal__title {
    font-size: 20px;
  }
}

.modal__title-highlight {
  color: var(--color-primary);
}

.modal__desc {
  font-size: 15px;
  color: var(--color-gray-500);
  line-height: 1.7;
  margin-bottom: 28px;
  text-align: center;
}

.modal__cta {
  margin-bottom: 12px;
  width: 100%;
}

.modal__dismiss {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 14px;
  color: var(--color-gray-400);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  font-family: inherit;
}

.modal__dismiss:hover {
  color: var(--color-gray-600);
}

/* ==========================================
   플로팅 CTA (PC)
   ========================================== */

.floating-cta {
  position: fixed;
  right: 24px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 200;
}

@media (max-width: 768px) {
  .floating-cta {
    display: none;
  }
}

.floating-cta__btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.floating-cta__btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.floating-cta__btn--phone {
  background: #fff;
  color: var(--color-gray-600);
  border: 1px solid var(--color-gray-200) !important;
}

.floating-cta__btn--kakao {
  background: #FEE500;
  color: #191919;
}

.floating-cta__btn--main {
  background: var(--gradient-cta);
  color: #fff;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  height: 60px;
  border-radius: 16px;
  padding: 0 16px;
  width: auto;
  font-family: inherit;
}

/* ==========================================
   모바일 하단 고정 바
   ========================================== */

.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  z-index: 200;
  background: #fff;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.06), 0 -4px 16px rgba(0, 0, 0, 0.05);
}

@media (min-width: 769px) {
  .mobile-bottom-bar {
    display: none;
  }
}

.mobile-bottom-bar__btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
  font-family: inherit;
}

.mobile-bottom-bar__btn--phone {
  background: #fff;
  color: var(--color-gray-600);
  flex: 0 0 72px;
}

.mobile-bottom-bar__btn--phone:hover {
  background: var(--color-gray-50, #f9fafb);
}

.mobile-bottom-bar__btn--kakao {
  background: #FEE500;
  color: #191919;
  flex: 0 0 72px;
}

.mobile-bottom-bar__btn--kakao:hover {
  background: #f5db00;
}

.mobile-bottom-bar__btn--apply {
  background: var(--gradient-cta);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex: 1;
}

.mobile-bottom-bar__btn--apply:hover {
  opacity: 0.92;
}

/* activity 카드 배지 버튼 스타일 */
button.activity__card-badge {
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s;
}
button.activity__card-badge:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}
