/* ============================================
   LOCATEWISE - 맞춤 리포트 신청 페이지
   ============================================ */

/* 페이지 진입 */
.page-container {
  animation: pageEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 리포트 타입 카드 강화 */
.report-type-card {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.report-type-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 158, 135, 0.03) 0%, rgba(10, 158, 135, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.report-type-card:hover::before {
  opacity: 1;
}

.report-type-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(10, 110, 92, 0.1);
}

.report-type-card.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(10, 158, 135, 0.02) 0%, rgba(10, 158, 135, 0.06) 100%);
  box-shadow: 0 0 0 3px rgba(10, 158, 135, 0.15), 0 8px 24px rgba(10, 110, 92, 0.1);
}

.report-type-card.selected::after {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  animation: checkPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(10, 110, 92, 0.3);
}

@keyframes checkPop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* 샘플 버튼 그룹 */
.sample-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

/* 스태거 진입 */
.report-type-grid .report-type-card {
  animation: cardPopIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.report-type-grid .report-type-card:nth-child(1) { animation-delay: 0.1s; }
.report-type-grid .report-type-card:nth-child(2) { animation-delay: 0.2s; }

@keyframes cardPopIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 폼 컨테이너 진입 */
.form-container {
  animation: slideUp 0.5s ease 0.25s both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 비용 표시 강조 */
.cost-display strong {
  font-size: var(--font-size-xl);
  transition: all var(--transition-base);
}

/* 신청 버튼 강화 */
#generate-btn {
  position: relative;
  overflow: hidden;
}

#generate-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s ease;
}

#generate-btn:hover::after {
  left: 100%;
}

/* 샘플 보기 버튼 */
.btn-sample-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  padding: 8px 16px;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--color-primary-200);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-family);
  min-height: 44px;
}

.btn-sample-preview .icon {
  width: 16px;
  height: 16px;
}

.btn-sample-preview:hover {
  background: var(--color-primary-50);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(10, 110, 92, 0.12);
}

.btn-sample-preview:active {
  transform: translateY(0);
}

/* 반응형 */
@media (max-width: 768px) {
  .report-type-grid {
    grid-template-columns: 1fr;
  }

  .form-container {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-container,
  .report-type-grid .report-type-card,
  .form-container {
    animation: none;
  }
}

/* ============================================
   Report Type Cards (Generate Page)
   ============================================ */
.report-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.report-type-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.report-type-card.selected {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.report-type-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.report-type-card .card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.report-type-card h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: 8px;
}

.report-type-card .card-text {
  color: var(--text-light);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  margin-bottom: 16px;
}

.report-type-card .card-cost {
  display: flex;
  align-items: center;
  gap: 6px;
}

.report-type-card .card-cost .gem {
  font-size: 1.3rem;
}

.report-type-card .card-cost strong {
  color: var(--primary);
  font-size: var(--font-size-xl);
}

.report-type-card .card-cost .sub {
  color: var(--text-light);
  font-size: var(--font-size-sm);
}

.premium-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  text-transform: uppercase;
  z-index: 1;
}

#type-premium {
  border: 2px solid #f59e0b;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  overflow: hidden;
}

#type-premium.selected {
  border-color: #d97706;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

#type-premium .card-icon {
  font-size: 2.5rem;
}

/* ============================================
   아파트·지역 검색 자동완성
   ============================================ */
.apt-search-wrap {
  position: relative;
}

#apt-search-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border, #e8e6e3);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#apt-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 158, 135, 0.12);
}

#apt-search-input.apt-selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(10, 158, 135, 0.03), rgba(10, 158, 135, 0.06));
}

.apt-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border, #e8e6e3);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-height: 260px;
  overflow-y: auto;
}

.apt-search-item {
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.apt-search-item:last-child {
  border-bottom: none;
}

.apt-search-item:hover,
.apt-search-item--active {
  background: var(--color-primary-50, #f0fdf4);
}

.apt-search-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.apt-search-meta {
  font-size: 0.8rem;
  color: var(--text-light, #888);
  white-space: nowrap;
}

.apt-search-loading,
.apt-search-empty {
  padding: 16px 14px;
  text-align: center;
  color: var(--text-light, #888);
  font-size: 0.85rem;
}

.apt-search-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  gap: 12px;
}

.apt-search-divider::before,
.apt-search-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border, #e8e6e3);
}

.apt-search-divider span {
  font-size: 0.8rem;
  color: var(--text-light, #999);
  white-space: nowrap;
}

/* 평형 선택 */
.area-filter-options {
    display: flex;
    gap: 10px;
}

.area-option {
    flex: 1;
    cursor: pointer;
}

.area-option input[type="radio"] {
    display: none;
}

.area-option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition-base);
    text-align: center;
}

.area-option-card strong {
    font-size: var(--font-size-base);
    color: var(--text);
}

.area-option-card .area-detail {
    font-size: var(--font-size-xs);
    color: var(--text-light);
}

.area-option input[type="radio"]:checked + .area-option-card {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(10, 158, 135, 0.02), rgba(10, 158, 135, 0.06));
    box-shadow: 0 0 0 3px rgba(10, 158, 135, 0.15);
}

.form-hint {
    margin-top: 8px;
    font-size: var(--font-size-xs);
    color: var(--text-light);
}

@media (max-width: 768px) {
    .area-filter-options {
        flex-direction: column;
    }
}

