/* 
// wp-content/plugins/emb-meal-suggest/assets/meal.css
*/

/* Page block */
.eb-meal{
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 0px 20px;
}

.eb-meal-head{
  text-align: center;
  margin-bottom: 14px;
}

.eb-meal-title{
  font-size: 34px;
  letter-spacing: -0.4px;
  margin: 0 0 6px;
}

.eb-meal-sub{
  margin: 0 0 12px;
  color: #555;
}

.eb-meal-chips{
  display:flex;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
}

.eb-meal-chip{
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid #eee;
  border-radius: 999px;
  background: #fafafa;
  color: #444;
}

/* Widget */
.eb-meal-widget{
  max-width: 720px;
  margin: 14px auto 0;
  padding: 18px;
  border: 1px solid #eee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,0.04);
}

.eb-meal-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom: 12px;
}

.eb-meal-row--modes{
  justify-content:flex-start;
}

.eb-meal-btn,
.eb-meal-go,
.eb-meal-again,
.eb-meal-copy{
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  min-height: 44px;
}

.eb-meal-btn.is-active{
  border-color:#111;
}

.eb-meal-input{
  flex:1;
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  min-height: 44px;
}

.eb-meal-result{
  min-height: 84px;
  padding: 0px;
  border-radius: 12px;
  background:#fafafa;
  border: 1px solid #eee;
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 15px;
}

.eb-meal-row--actions{
  margin-top: 6px;
}

.eb-meal-footnote{
  margin: 10px 0 0;
  color:#777;
  font-size: 13px;
}

/* CTA: 추천 받기 버튼을 프라이머리로 */
.eb-meal-go{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  padding: 10px 16px;
  border-radius: 12px;

  border: 0;
  background: #111;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.2px;

  box-shadow: 0 10px 24px rgba(0,0,0,0.14);
  transition: transform .08s ease, box-shadow .12s ease, opacity .12s ease;
}

.eb-meal-go:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

.eb-meal-go:active{
  transform: translateY(0px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.14);
}

.eb-meal-go[disabled]{
  opacity: .6;
  cursor: default;
  transform: none;
}

/* 로딩 스피너 */
.eb-meal-go-spin{
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: rgba(255,255,255,0.95);
  animation: ebspin 1s linear infinite;
  display: none;
}

.eb-meal-go.is-loading .eb-meal-go-spin{
  display: inline-block;
}

@keyframes ebspin { to { transform: rotate(360deg); } }

@media (max-width: 520px){
  .eb-meal-title{ font-size: 28px; }
}

/* ====== 지금 상태 UI ====== */
.eb-meal-state{
  margin: 6px 0 14px;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 14px;
  background: #fcfcfc;
}

.eb-meal-state-head{
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 10px;
}

.eb-meal-state-title{
  font-weight: 800;
  letter-spacing: -0.2px;
}

.eb-meal-state-hint{
  font-size: 12px;
  color:#777;
}

.eb-meal-state-group{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin-bottom: 10px;
}

.eb-meal-state-group:last-child{ margin-bottom: 0; }

.eb-meal-state-group-label{
  width: 58px;
  font-size: 12px;
  color:#666;
  padding-top: 8px;
}

.eb-meal-state-options{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  flex: 1;
}

.eb-meal-pill{
  border: 1px solid #e6e6e6;
  background: #fff;
  color:#333;
  border-radius: 999px;
  padding: 6px 8px;
  cursor: pointer;
  font-weight: 700;
  min-height: 36px;
  font-size: 13px;
  transition: transform .06s ease, border-color .12s ease;
}

.eb-meal-pill:hover{
  border-color:#cfcfcf;
  transform: translateY(-1px);
}

.eb-meal-pill.is-active{
  border-color:#111;
  background:#111;
  color:#fff;
  transform: none;
}

/* 퀵 버튼 */
.eb-meal-quick{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top: 10px;
}

.eb-meal-quickbtn{
  border: 1px dashed #d9d9d9;
  background: #fff;
  color:#333;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
  min-height: 38px;
  font-size: 13px;
}

.eb-meal-quickbtn:hover{
  border-color:#bfbfbf;
}

/* ====== 목표(선택) ====== */
.eb-meal-goal{
  margin: 0 0 12px;
}

.eb-meal-goal-title{
  font-weight: 800;
  letter-spacing: -0.2px;
  margin: 0 0 8px;
}

.eb-meal-muted{
  font-weight: 600;
  color:#777;
  font-size: 12px;
}

.eb-meal-goal-options{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.eb-meal-chipbtn{
  border: 1px solid #e6e6e6;
  background: #fff;
  color:#333;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
  min-height: 36px;
  font-size: 13px;
}

.eb-meal-chipbtn:hover{
  border-color:#cfcfcf;
}

.eb-meal-chipbtn.is-active{
  border-color:#111;
  background:#f6f6f6;
}

/* ===== 결과 카드 강조 ===== */
.eb-meal-result{
  background:#fff;
  border: 1px solid #eee;
}

.eb-meal-card{
  border-radius: 14px;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  border: 1px solid #eee;
  position: relative;
  overflow: hidden;
}

.eb-meal-card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width: 6px;
  background: #111;
  opacity: .9;
}

.eb-meal-card-title{
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.2px;
  margin: 0 0 10px;
  padding-left: 10px;
}

.eb-meal-card-list{
  list-style: none;
  padding: 0 0 0 10px;
  margin: 0;
  display: grid;
  gap: 8px;
}

.eb-meal-card-list li{
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 10px 12px;
  line-height: 1.5;
  font-weight: 650;
  color: #222;
}

/* 상태 헤더 우측 도구 영역 */
.eb-meal-state-tools{
  display:flex;
  align-items:center;
  gap:10px;
}

.eb-meal-linkbtn{
  border: 0;
  background: transparent;
  padding: 6px 8px;
  border-radius: 10px;
  font-weight: 800;
  color: #333;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.eb-meal-linkbtn:hover{
  background:#f1f1f1;
  text-decoration: none;
}

/* 빠른 추천 바 */
.eb-meal-quickbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 10px 12px;
  border: 1px dashed #e2e2e2;
  border-radius: 14px;
  background:#fff;
  margin: 6px 0 12px;
}

.eb-meal-quickbar-title{
  font-weight: 900;
  font-size: 13px;
  color:#333;
}

.eb-meal-quickbar-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.eb-meal-quickbtn{
  border: 1px solid #e6e6e6;
  background: #fff;
  color:#333;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 900;
  min-height: 36px;
  font-size: 13px;
}

.eb-meal-quickbtn:hover{
  border-color:#cfcfcf;
}

/* 모바일에서는 빠른 추천이 한 줄로 깔끔하게 */
@media (max-width: 520px){
  .eb-meal-quickbar{
    align-items:flex-start;
    flex-direction:column;
  }
  .eb-meal-quickbar-actions{
    width:100%;
    justify-content:flex-start;
  }
}

/* =========================
   PATCH: UX/모바일/결과 강조
   (파일 맨 아래에 추가)
========================= */

/* 1) 위젯 패딩/간격 미세 조정 */
.eb-meal-widget{
  padding: 18px;
}
@media (max-width: 520px){
  .eb-meal-widget{ padding: 12px; }
  .eb-meal-row{ gap:8px; }
}

/* 2) "추천 받기" 버튼이 모바일에서 너무 눌리기 좋게 */
.eb-meal-row--input{
  align-items: stretch;
}
.eb-meal-go{
  min-width: 120px;
}
@media (max-width: 520px){
  .eb-meal-row--input{
    flex-direction: column;
  }
  .eb-meal-input{
    width: 100%;
    min-width: 0;
  }
  .eb-meal-go{
    width: 100%;
    min-height: 48px;
  }
}

/* 3) 집/배달/밖 버튼이 3개 균등 배치되면 보기 좋음(특히 모바일) */
.eb-meal-row--modes .eb-meal-btn{
  flex: 0 0 auto;
}
@media (max-width: 520px){
  .eb-meal-row--modes{
    gap:8px;
  }
  .eb-meal-row--modes .eb-meal-btn{
    flex: 1 1 0;
    text-align: center;
  }
}

/* 4) 상태 그룹 레이블 폭 때문에 줄바꿈/정렬이 어색해질 때 방지 */
@media (max-width: 520px){
  .eb-meal-state-group{
    flex-direction: column;
    gap:6px;
  }
  .eb-meal-state-group-label{
    width: auto;
    padding-top: 0;
    font-weight: 800;
    color:#444;
  }
}

/* 5) 결과 영역: 처음엔 안 보이게(빈 박스 느낌 제거) + 출력 후 강조 */
.eb-meal-result{
  display: none;          /* 기본은 숨김: JS에서 결과 있을 때만 보여주기 */
  padding: 0;
  background: transparent;
  border: 0;
  min-height: 0;
}
.eb-meal-result.is-visible{
  display: block;
  margin-top: 12px;
}

/* 6) 카드 강조를 조금 더 '결과 나왔다!' 느낌으로 */
.eb-meal-card{
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}
.eb-meal-card-title{
  display:flex;
  align-items:center;
  gap:8px;
}
.eb-meal-card-title::after{
  content:"";
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,0.06);
}

/* 7) 다시 추천/결과 복사 버튼: 나란히 + 모바일에서 2개 꽉 채우기 */
.eb-meal-row--actions{
  gap:8px;
}
@media (max-width: 520px){
  .eb-meal-row--actions{
    display:flex;
  }
  .eb-meal-again,
  .eb-meal-copy{
    flex: 1 1 0;
    text-align:center;
  }
}

/* 8) 접근성: 포커스 링 (키보드 탭 이동 시) */
.eb-meal-btn:focus-visible,
.eb-meal-pill:focus-visible,
.eb-meal-chipbtn:focus-visible,
.eb-meal-quickbtn:focus-visible,
.eb-meal-go:focus-visible{
  outline: 3px solid rgba(0,0,0,0.18);
  outline-offset: 2px;
}

/* ====== SEO/도움말 섹션 ====== */
.eb-meal-seo{
  max-width: 720px;
  margin: 18px auto 0;
  padding: 14px 16px;
  border: 1px solid #eee;
  border-radius: 16px;
  background: #fcfcfc;
}

.eb-meal-seo h2{
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.2px;
}

.eb-meal-seo p{
  margin: 0 0 10px;
  color: #444;
  line-height: 1.6;
}

.eb-meal-seo h3{
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 900;
  color: #222;
}

.eb-meal-seo ul{
  margin: 0 0 10px 18px;
  padding: 0;
  color:#333;
  line-height: 1.6;
}

.eb-meal-seo li{
  margin: 4px 0;
}

.eb-meal-seo strong{
  font-weight: 900;
}

.eb-meal-seo br{
  content: "";
}

/* FAQ 문단을 '카드'처럼 */
.eb-meal-seo p strong{
  display:inline-block;
  margin-bottom: 4px;
}

.eb-meal-seo p{
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 10px 12px;
}

/* 첫 번째 소개 문단만 카드 처리 안 하고 자연스럽게 */
.eb-meal-seo > p:first-of-type{
  background: transparent;
  border: 0;
  padding: 0;
}

/* 모바일 타이포 조금 줄이기 */
@media (max-width: 520px){
  .eb-meal-seo{ padding: 12px 12px; }
  .eb-meal-seo h2{ font-size: 17px; }
}
