/* FeelCrystals "Ask Astrologer" chat + two-column Palm Reading layout */

/* full width page: the chat replaces the theme sidebar */
.fcpr-has-chat .wd-sidebar { display: none !important; }
.fcpr-has-chat .wd-content-area { --wd-col-lg: 12 !important; --wd-col-md: 12 !important; }

.fcx { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 26px; align-items: start; max-width: 1260px; margin: 0 auto 40px;
  font: 400 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #1d2030; }
.fcx .fcp { max-width: none; margin: 0; }
/* grid children must be allowed to shrink, otherwise the wide product swipe rows push the page past the screen */
.fcx > * { min-width: 0; max-width: 100%; }
.fcx { width: 100%; max-width: min(1260px, 100%); overflow-wrap: anywhere; }
.fcpr-has-chat .wd-content-area { min-width: 0; overflow-x: clip; } /* clip (not hidden) keeps the sticky chat working */
.fcx-tabs { display: none; }
.fcx *, .fcx *::before, .fcx *::after { box-sizing: border-box; }
.fcx .aa * { text-transform: none; letter-spacing: normal; }

/* chat card */
.aa { position: sticky; top: 90px; height: min(760px, calc(100vh - 110px)); min-height: 520px; display: flex; flex-direction: column;
  background: #fff; border: 1px solid #e4e1ee; border-radius: 18px; overflow: hidden; box-shadow: 0 12px 34px rgba(59, 31, 107, .08); font-size: 14.5px; }
.aa-h { flex: none; background: linear-gradient(160deg, #1b1035, #3b1f6b); color: #fff; padding: 15px 18px; display: flex; align-items: center; gap: 12px; }
.aa-av { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle, #ffe7a8, #c08a2e); display: grid; place-items: center;
  color: #3b1f6b; font-size: 22px; flex: none; box-shadow: 0 0 16px rgba(255, 215, 130, .5); }
.aa-name { font-weight: 700; font-size: 16px; color: #fff; }
.aa-st { font-size: 12.5px; color: #d9c8ff; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.aa-dot { width: 8px; height: 8px; border-radius: 50%; background: #5ee08a; box-shadow: 0 0 6px #5ee08a; flex: none; }

/* usage meter */
.aa-usage { flex: none; padding: 9px 16px 10px; border-bottom: 1px solid #ece7f6; background: #fff; font-size: 13px; color: #4b4f63; }
.aa-usage:empty { display: none; }
.aa-budget { flex: none; display: flex; align-items: center; gap: 8px; padding: 7px 16px; border-bottom: 1px solid #ece7f6; background: #fff; font-size: 13px; color: #4b4f63; }
.aa-budget label { margin: 0; font-weight: 600; color: #4b4f63; font-size: 13px; }
#fc-astro .aa-budget select { flex: 1; width: auto; height: auto; min-height: 0; margin: 0; padding: 6px 28px 6px 10px; border: 1.5px solid #e4e1ee; border-radius: 10px; background-color: #fff; color: #1d2030; font-size: 14px; font-family: inherit; box-shadow: none; }
.aa-u-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.aa-u-row a { color: #7a4bd1; font-weight: 600; text-decoration: none; white-space: nowrap; }
.aa-u-bar { height: 5px; background: #efe8fb; border-radius: 9px; overflow: hidden; margin-top: 7px; }
.aa-u-bar b { display: block; height: 100%; background: linear-gradient(90deg, #7a4bd1, #c9a227); border-radius: 9px; transition: width .4s; }
.aa-usage-low .aa-u-bar b { background: #e0794b; }
.aa-usage-off { background: #fff8ec; color: #8a5a00; text-align: center; }

/* messages */
.aa-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #faf8ff; overscroll-behavior: contain; }
.aa-body > * { flex-shrink: 0; } /* long chats scroll instead of squashing messages and product cards */
.aa-msg { max-width: 88%; padding: 11px 14px; border-radius: 16px; line-height: 1.55; overflow-wrap: anywhere; animation: aa-in .25s ease-out; }
.aa-bot { align-self: flex-start; background: #fff; border: 1px solid #ece7f6; border-bottom-left-radius: 4px; color: #1d2030; }
.aa-bot b { color: #3b1f6b; }
.aa-user { align-self: flex-end; background: #7a4bd1; color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.aa-notice { align-self: stretch; text-align: center; font-size: 13px; color: #8a5a00; background: #fff8ec; border: 1px solid #f3dfb4; border-radius: 12px; padding: 9px 12px; }
.aa-login { align-self: stretch; background: linear-gradient(135deg, #f3ecff, #fff7e8); border: 1px solid #e3d6fa; border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.aa-login .aa-login-btn { display: block; margin-top: 10px; text-align: center; background: #7a4bd1; color: #fff !important; border-radius: 10px; padding: 10px; font-weight: 700; text-decoration: none !important; }
@keyframes aa-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.aa-typing { align-self: flex-start; background: #fff; border: 1px solid #ece7f6; border-radius: 16px; border-bottom-left-radius: 4px; padding: 12px 14px; display: flex; gap: 4px; }
.aa-typing i { width: 7px; height: 7px; border-radius: 50%; background: #b49ae6; animation: aa-dot 1s infinite; }
.aa-typing i:nth-child(2) { animation-delay: .15s; } .aa-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes aa-dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.aa-chips { display: flex; flex-wrap: wrap; gap: 7px; }
#fc-astro .aa-chip { height: auto; min-height: 0; margin: 0; border: 1.5px solid #e1d7f5; background: #fff !important; color: #5b34a8 !important; border-radius: 999px;
  padding: 7px 12px; font-weight: 600; font-size: 13px; line-height: 1.2; font-family: inherit; cursor: pointer; box-shadow: none; }
#fc-astro .aa-chip:hover { background: #efe8fb !important; }

/* product cards */
.aa-prods { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; align-self: stretch; scrollbar-width: thin; }
.aa-p { flex: 0 0 136px; background: #fff; border: 1px solid #ece7f6; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; animation: aa-in .25s ease-out; }
.aa-im { display: block; aspect-ratio: 1 / 1; background: #f4f2f8; }
.aa-im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aa-tx { padding: 8px 9px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.aa-nm { font-size: 12.5px; line-height: 1.3; color: #1d2030 !important; text-decoration: none !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aa-pr { font-weight: 700; font-size: 13px; }
.aa-pr s { color: #8a8fa3; font-weight: 400; font-size: 11.5px; }
#fc-astro .aa-add { display: block; height: auto; min-height: 0; margin-top: auto; border: 1.5px solid #7a4bd1; background: #fff !important; color: #7a4bd1 !important;
  border-radius: 8px; padding: 6px; font-weight: 700; font-size: 12px; line-height: 1.2; font-family: inherit; text-align: center; cursor: pointer; text-decoration: none !important; box-shadow: none; }
#fc-astro .aa-add.aa-ok { background: #1f8a5b !important; border-color: #1f8a5b; color: #fff !important; }

/* composer */
.aa-foot { flex: none; border-top: 1px solid #ece7f6; padding: 10px 12px; background: #fff; }
.aa-form { display: flex; gap: 8px; align-items: flex-end; border: 1.5px solid #e4e1ee; border-radius: 14px; padding: 6px 6px 6px 12px; margin: 0; }
.aa-form:focus-within { border-color: #7a4bd1; }
#fc-astro .aa-form textarea { flex: 1; height: auto; min-height: 0; border: 0; outline: 0; resize: none; margin: 0; padding: 7px 0; box-shadow: none;
  font-size: 16px; line-height: 1.4; font-family: inherit; max-height: 110px; background: transparent; color: #1d2030; }
#fc-astro .aa-send { width: 42px; height: 42px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 11px; background: #7a4bd1 !important; color: #fff !important;
  font-size: 18px; line-height: 1; cursor: pointer; flex: none; box-shadow: none; }
#fc-astro .aa-send:disabled { opacity: .4; cursor: default; }
.aa-note { font-size: 11.5px; color: #8a8fa3; margin: 7px 2px 0 !important; line-height: 1.45; }

/* tablet / mobile: two tabs instead of two columns */
@media (max-width: 1020px) {
  .fcx { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .fcx-tabs { display: flex; position: sticky; top: 0; z-index: 5; background: #fff; padding: 8px 0 12px; gap: 8px; }
  #fcx .fcx-tabs button { flex: 1; height: auto; min-height: 0; margin: 0; border: 1.5px solid #e1d7f5; background: #fff !important; color: #5b34a8 !important;
    border-radius: 12px; padding: 11px 8px; font-weight: 700; font-size: 14.5px; line-height: 1.2; font-family: inherit; text-transform: none; letter-spacing: 0; cursor: pointer; box-shadow: none; }
  #fcx .fcx-tabs button.fcx-on { background: #7a4bd1 !important; border-color: #7a4bd1; color: #fff !important; }
  .fcx[data-tab="read"] .aa { display: none; }
  .fcx[data-tab="chat"] .fcp { display: none; }
  .aa { position: static; height: calc(100vh - 150px); height: calc(100dvh - 150px); min-height: 460px; }
}
