/* 교육추천 문답(recommend.jsp) 전용 스타일. pedu.jsp 카드와 같은 톤을 유지한다. */

.rec-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 0 48px;
}

.rec-intro {
  text-align: center;
  margin-bottom: 24px;
}
.rec-intro h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}
.rec-intro h2 b { color: #059669; }
.rec-intro p {
  color: #6b7280;
  font-size: 14px;
  margin: 0;
}

/* ---------------------------------------------------------------- 진행 막대 */

.rec-progress {
  margin-bottom: 20px;
}
.rec-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}
.rec-progress-fill {
  height: 100%;
  width: 0;
  background: #059669;
  border-radius: 999px;
  transition: width 0.3s ease;
}
.rec-progress-text {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
  text-align: right;
}

/* ------------------------------------------------------------------- 문항 */

.rec-step { display: none; }
.rec-step.active { display: block; }

.rec-q {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 6px;
}
.rec-q-help {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 18px;
}

.rec-opts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.rec-opts.rec-opts-1 { grid-template-columns: 1fr; }
.rec-opts.rec-opts-3 { grid-template-columns: repeat(3, 1fr); }

.rec-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.rec-opt:hover {
  border-color: #059669;
  background: #f0fdf4;
  transform: translateY(-1px);
}
.rec-opt.selected {
  border-color: #059669;
  background: #ecfdf5;
}
.rec-opt small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  color: #6b7280;
}
.rec-opt[hidden] { display: none; }

.rec-nav {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rec-back {
  border: none;
  background: none;
  color: #6b7280;
  font-size: 14px;
  padding: 6px 0;
  cursor: pointer;
}
.rec-back:hover { color: #111827; text-decoration: underline; }
.rec-back[hidden] { visibility: hidden; display: inline-block; }

.rec-privacy {
  margin-top: 28px;
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  line-height: 1.6;
}

/* ------------------------------------------------------------------- 결과 */

.rec-result-head {
  margin-bottom: 20px;
}
.rec-result-head h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 14px;
}
.rec-result-head h2 b { color: #059669; }

.rec-reasons {
  margin: 0;
  padding: 16px 18px 16px 34px;
  background: #f9fafb;
  border-left: 4px solid #059669;
  border-radius: 0 8px 8px 0;
}
.rec-reasons li {
  font-size: 14px;
  line-height: 1.7;
  color: #374151;
}
.rec-reasons li + li { margin-top: 6px; }

.rec-disclaimer {
  margin-top: 12px;
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.6;
}

.rec-section { margin-top: 32px; }
.rec-section-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}
.rec-section-title span {
  font-size: 13px;
  font-weight: 400;
  color: #6b7280;
}

/* 1순위 */

.rec-primary {
  border: 2px solid #059669;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.rec-primary.strong {
  border-width: 3px;
  border-color: #dc2626;
  box-shadow: 0 6px 24px rgba(220, 38, 38, 0.18);
  padding: 26px;
}

.rec-primary-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: #059669;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}
.rec-primary.strong .rec-primary-badge {
  background: #dc2626;
  font-size: 14px;
  padding: 7px 16px;
}

.rec-primary-items {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.rec-primary-item {
  display: flex;
  gap: 14px;
  flex: 1 1 320px;
  min-width: 0;
}
.rec-primary-item .rec-thumb {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
}
.rec-primary-item > div:last-child {
  flex: 1 1 auto;
  min-width: 0;
}
.rec-primary.strong .rec-primary-item .rec-thumb {
  width: 110px;
  height: 110px;
}
.rec-primary-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}
.rec-primary.strong .rec-primary-name { font-size: 20px; }

.rec-combo-note {
  flex-basis: 100%;
  font-size: 13px;
  color: #b45309;
  background: #fffbeb;
  border-radius: 8px;
  padding: 10px 12px;
}

.rec-parts {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rec-part {
  font-size: 12px;
  color: #374151;
  background: #f3f4f6;
  border-radius: 6px;
  padding: 3px 8px;
}

.rec-primary-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.rec-total-label { font-size: 13px; color: #6b7280; }
.rec-total-list {
  font-size: 14px;
  color: #9ca3af;
  text-decoration: line-through;
}
.rec-total-price {
  font-size: 24px;
  font-weight: 800;
  color: #dc2626;
}
.rec-total-saving {
  font-size: 13px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border-radius: 6px;
  padding: 4px 8px;
}
.rec-primary-foot .rec-buy,
.rec-primary-foot .rec-upgrade { margin-left: auto; }

/* 카드 목록 */

.rec-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.rec-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.rec-card.owned { background: #f9fafb; }
.rec-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.rec-thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.rec-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.rec-card-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}
.rec-card-price {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
  color: #dc2626;
}
.rec-card-desc {
  margin-top: 10px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  flex-grow: 1;
}
.rec-card-foot { margin-top: 12px; }

.rec-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 7px;
  margin-bottom: 6px;
}
.rec-tag-owned { background: #e0f2fe; color: #0369a1; }
.rec-tag-partial { background: #fef3c7; color: #b45309; }
.rec-tag-wait { background: #f3f4f6; color: #6b7280; }
.rec-tag-saving { background: #ecfdf5; color: #059669; }

.rec-buy,
.rec-upgrade {
  display: inline-block;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 24px;
  cursor: pointer;
}
.rec-buy { background: #059669; }
.rec-buy:hover { background: #047857; color: #fff; }
.rec-buy:disabled { background: #d1d5db; cursor: not-allowed; }

/* 일부만 보유해 보유분만큼 깎아 사는 버튼. 구입 버튼과 모양을 맞추고 색으로만 구분한다. */
.rec-upgrade { background: #0f766e; }
.rec-upgrade:hover { background: #115e59; color: #fff; }

.rec-buy-sm { font-size: 14px; padding: 8px 18px; width: 100%; }
.rec-primary.strong .rec-buy,
.rec-primary.strong .rec-upgrade { font-size: 17px; padding: 14px 32px; }

.rec-myclass {
  display: inline-block;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  width: 100%;
  cursor: pointer;
}
.rec-myclass:hover { background: #f3f4f6; color: #111827; }

/* 접히는 대안 */

.rec-toggle {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  width: 100%;
}
.rec-toggle:hover { background: #f3f4f6; }
.rec-collapse[hidden] { display: none; }
.rec-toggle + .rec-collapse { margin-top: 18px; }
.rec-options + .rec-options { margin-top: 28px; }

/* 마무리 버튼 */

.rec-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.rec-actions a,
.rec-actions button {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  text-decoration: none;
}
.rec-actions a:hover,
.rec-actions button:hover { background: #f3f4f6; color: #111827; text-decoration: none; }
.rec-actions .rec-actions-main {
  border-color: #059669;
  background: #059669;
  color: #fff;
}
.rec-actions .rec-actions-main:hover { background: #047857; color: #fff; }

.rec-all-owned {
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  border-radius: 10px;
  padding: 20px;
  font-size: 15px;
  line-height: 1.7;
  color: #0c4a6e;
}

/* ------------------------------------------------------------------ 모바일 */

@media (max-width: 576px) {
  .rec-wrap { padding: 16px 0 36px; }
  .rec-intro h2 { font-size: 21px; }
  .rec-q { font-size: 17px; }
  .rec-section-title { flex-direction: column; gap: 2px; }
  .rec-opts { grid-template-columns: 1fr; }
  .rec-opts.rec-opts-3 { grid-template-columns: 1fr; }
  .rec-opt { padding: 14px 16px; font-size: 15px; }
  .rec-result-head h2 { font-size: 20px; }
  .rec-primary,
  .rec-primary.strong { padding: 16px; }
  .rec-primary-item .rec-thumb,
  .rec-primary.strong .rec-primary-item .rec-thumb { width: 64px; height: 64px; }
  .rec-primary-name,
  .rec-primary.strong .rec-primary-name { font-size: 16px; }
  .rec-primary-foot { gap: 8px; }
  .rec-total-price { font-size: 20px; }
  .rec-primary-foot .rec-buy,
  .rec-primary-foot .rec-upgrade { margin-left: 0; width: 100%; }
  .rec-cards { grid-template-columns: 1fr; }
}
