/* Jamalek landing — care sections: makeup-mode toggle, My skin journey tabs
   (trend chart, checklist, history, journal), care-advisor chat and specialists. */

/* Makeup mode demo. */
.makeup-demo { padding: 28px; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-md); border: 1px solid var(--blush-2); }
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 999px; background: var(--cream-2); margin-bottom: 22px; }
.seg button { position: relative; z-index: 1; border: 0; background: none; padding: 11px; border-radius: 999px; font-weight: 700; color: var(--muted); transition: color .35s; }
.seg button[aria-checked="true"] { color: #fff; }
.seg-thumb { position: absolute; top: 5px; bottom: 5px; inset-inline-start: 5px; width: calc(50% - 5px); border-radius: 999px; background: var(--grad-rose); box-shadow: 0 8px 18px -10px rgba(142, 90, 102, .9); transition: transform .5s var(--ease-out); }
[data-mode-active="makeup"] .seg-thumb { transform: translateX(-100%); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border-radius: 999px; background: #EAF3EC; color: #3E7350; font-size: .88rem; font-weight: 700; transition: background .45s, color .45s, transform .45s var(--ease-out); }
.chip::before { content: "✓ "; }
[data-mode-active="makeup"] .chip[data-hide] { background: #EEE9EA; color: #8C8487; transform: scale(.96); }
[data-mode-active="makeup"] .chip[data-hide]::before { content: "◌ "; }
.makeup-note { margin-top: 18px; padding: 12px 16px; border-radius: 16px; background: var(--cream); color: var(--mauve); font-size: .92rem; font-weight: 500; }

/* Journey tabs card. */
.journey-card { padding: 22px; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-lg); border: 1px solid var(--blush-2); min-height: 420px; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 5px; border-radius: 18px; background: var(--cream-2); margin-bottom: 20px; }
.tabs button { border: 0; background: none; padding: 10px 4px; border-radius: 14px; font-weight: 700; font-size: .92rem; color: var(--muted); transition: background .3s, color .3s, box-shadow .3s; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--rose-deep); box-shadow: var(--shadow-sm); }
.tab-panel { animation: panelIn .6s var(--ease-out); }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } }
.trend { width: 100%; height: auto; overflow: visible; }
.trend-grid { stroke: var(--blush-2); stroke-dasharray: 4 6; }
.trend-area { fill: url(#trend-fill); transition: opacity 1s .8s; }
.trend-line { fill: none; stroke: var(--rose); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; transition: stroke-dashoffset 2s var(--ease-out); }
.trend-dots circle { fill: #fff; stroke: var(--rose); stroke-width: 3; transition: opacity .4s; }
.trend-dots circle:last-child { fill: var(--rose); }
.trend-labels text { font: 700 13px system-ui, sans-serif; fill: var(--plum); text-anchor: middle; transition: opacity .5s; }
.js .trend:not(.is-drawn) .trend-line { stroke-dashoffset: 100; }
.js .trend:not(.is-drawn) :is(.trend-area, .trend-dots circle, .trend-labels text) { opacity: 0; }
.trend-dots circle:nth-child(2), .trend-labels text:nth-child(2) { transition-delay: .4s; }
.trend-dots circle:nth-child(3), .trend-labels text:nth-child(3) { transition-delay: .8s; }
.trend-dots circle:nth-child(4), .trend-labels text:nth-child(4) { transition-delay: 1.2s; }
.trend-dots circle:nth-child(5), .trend-labels text:nth-child(5) { transition-delay: 1.6s; }
.change-card { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 16px; border-radius: 16px; background: #EAF3EC; color: #3E7350; font-size: .92rem; font-weight: 500; }
.change-card b { font-family: system-ui, sans-serif; font-size: 1.4rem; }
.streak { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 18px; background: var(--grad-hero); color: #fff; margin-bottom: 14px; }
.streak b { font-family: system-ui, sans-serif; font-size: 1.8rem; line-height: 1; transition: transform .4s var(--ease-out); }
.streak b.bump { transform: scale(1.4); }
.week { display: flex; gap: 5px; margin-inline-start: auto; }
.week i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, .25); transition: background .4s; }
.week i.on { background: var(--gold-soft); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist label { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--cream); cursor: pointer; font-weight: 500; transition: background .3s, color .3s; }
.checklist input { position: absolute; opacity: 0; pointer-events: none; }
.checklist .box { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 8px; border: 2px solid var(--blush); background: #fff; color: #fff; transition: .3s var(--ease-out); }
.checklist .box .icon { width: 16px; height: 16px; stroke-width: 3; opacity: 0; transform: scale(.4); transition: .3s var(--ease-out); }
.checklist .kind { color: #4F8A62; }
.checklist input:checked + .box { background: #4F8A62; border-color: #4F8A62; }
.checklist input:checked + .box .icon { opacity: 1; transform: none; }
.checklist label:has(input:checked) { background: #EAF3EC; color: #3E7350; text-decoration: line-through; text-decoration-color: rgba(62, 115, 80, .45); }
.checklist input:focus-visible + .box { outline: 3px solid var(--rose); outline-offset: 2px; }
.hint { margin-top: 12px; font-size: .86rem; color: var(--muted); text-align: center; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.history li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--cream); }
.history .badge { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--grad-rose); color: #fff; font: 700 1.05rem system-ui, sans-serif; }
.history .badge.alt { background: #D9CFD1; }
.history div { display: grid; line-height: 1.4; }
.history small { color: var(--muted); text-align: right; }
.history .delta { margin-inline-start: auto; font-size: .8rem; font-weight: 700; color: var(--muted); }
.history .delta.up { color: #3E7350; font-family: system-ui, sans-serif; font-size: .95rem; }
.journal { position: relative; padding: 18px; border-radius: 18px; background: repeating-linear-gradient(transparent 0 31px, rgba(232, 197, 197, .55) 31px 32px), #FFFCFA; border: 1px solid var(--blush-2); min-height: 170px; }
.journal small { display: inline-flex; align-items: center; gap: 6px; color: var(--rose-deep); font-weight: 700; }
.journal p { margin-top: 6px; line-height: 32px; font-size: 1.02rem; }
.journal p.is-typing::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-inline-start: 2px; background: var(--rose); vertical-align: middle; animation: caret .8s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.journal .counter { position: absolute; bottom: 10px; inset-inline-end: 14px; font-size: .74rem; color: var(--muted); }

/* Care advisor chat. */
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; color: #EBD7DA; }
.ticks li { display: flex; align-items: center; gap: 10px; }
.ticks .icon { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: rgba(201, 162, 75, .2); color: var(--gold-soft); stroke-width: 2.4; }
.chat { border-radius: var(--radius-lg); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.chat-head div { display: grid; line-height: 1.35; }
.chat-head small { color: #CDB4B9; }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--grad-rose); color: #fff; }
.chat-body { display: flex; flex-direction: column; gap: 12px; padding: 20px; min-height: 360px; }
.msg { max-width: 84%; padding: 12px 16px; border-radius: 20px; font-size: .95rem; line-height: 1.65; }
.msg.me { align-self: flex-end; background: var(--grad-rose); color: #fff; border-start-end-radius: 6px; }
.msg.bot { align-self: flex-start; background: #fff; color: var(--ink); border-start-start-radius: 6px; }
.js .chat .msg { opacity: 0; transform: translateY(14px) scale(.96); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.js .chat .msg.is-shown { opacity: 1; transform: none; }
.msg .tag { display: inline-flex; align-items: center; gap: 4px; margin-inline-end: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .22); font-size: .76rem; }
.typing { align-self: flex-start; display: inline-flex; gap: 5px; padding: 14px 16px; border-radius: 20px; background: #fff; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--rose); animation: dot 1.1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
.chat-input { display: flex; align-items: center; gap: 10px; margin: 0 16px 16px; padding: 8px; padding-inline-start: 18px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #BFA6AC; font-size: .9rem; }
.chat-input i { display: grid; place-items: center; width: 38px; height: 38px; margin-inline-start: auto; border-radius: 50%; background: var(--grad-rose); color: #fff; }

/* Specialists. */
.spec-cards { display: grid; gap: 14px; }
.spec { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--blush-2); box-shadow: var(--shadow-sm); transition: transform .45s var(--ease-out), box-shadow .45s; }
.spec:hover { transform: translateX(-8px); box-shadow: var(--shadow-md); }
.spec-avatar { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 18px; background: var(--cream-2); color: var(--rose-deep); font-size: 1.3rem; }
.spec > div:not(.spec-actions) { display: grid; line-height: 1.5; }
.spec small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .86rem; }
.spec-actions { display: flex; gap: 6px; margin-inline-start: auto; }
.spec-actions i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--cream); color: var(--mauve); transition: background .3s, color .3s; }
.spec:hover .spec-actions i { background: var(--blush-2); color: var(--rose-deep); }
.spec-actions i:nth-child(2) { color: #3E7350; }

@media (max-width: 960px) {
  .makeup-grid, .journey-grid, .advisor-grid, .spec-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .makeup-demo, .journey-card { padding: 16px; }
  .tabs button { font-size: .82rem; }
  .spec { flex-wrap: wrap; }
  .spec-actions { margin-inline-start: 68px; }
  .chat-body { padding: 14px; min-height: 380px; }
  .msg { max-width: 92%; font-size: .9rem; }
}
