/* =====================================================================
   An astrologer's profile (/astrologer-details/{slug}): the head card with
   Chat / Audio Call, specialization, about, gifts, the week and reviews.
   Day and night come from the as-ui tokens; the intake modals take
   as-list.css.
   ===================================================================== */

.as-prof {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--as-hero-bg);
    padding-block: clamp(12px, 2vw, 22px) clamp(20px, 3vw, 34px);
}
.as-prof > .as-wheel {
    position: absolute;
    z-index: -1;
    width: min(620px, 80vw);
    right: -200px;
    top: -120px;
    opacity: .45;
}

/* ------------------------------------------------------------- head card */
.as-prof__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    align-items: center;
    gap: 20px 32px;
    margin-top: 12px;
    padding: clamp(16px, 2.5vw, 28px);
    border-radius: 24px;
    box-shadow: var(--as-shadow-lg);
}
.as-prof__who { display: flex; align-items: center; gap: 22px; min-width: 0; }
.as-prof__pic { position: relative; flex: none; width: 136px; height: 136px; }
.as-prof__pic img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--as-surface);
    background: var(--as-surface-2);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--as-primary) 60%, transparent), var(--as-shadow);
}
.as-prof__pic .as-badge { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); white-space: nowrap; }
.as-prof__info { min-width: 0; }
.as-prof__namerow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.as-prof .as-prof__name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
    font-weight: 800;
    overflow-wrap: anywhere;
}
.as-prof__name .fa-circle-check { flex: none; font-size: .62em; color: #16a34a; }
:root[data-theme="dark"] .as-prof__name .fa-circle-check { color: #4ade80; }
.as-prof__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.as-prof__tools form { margin: 0; }
.as-prof__line {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin: 8px 0 0;
    font-size: .95rem;
    color: var(--as-text-2);
}
.as-prof__line > span { display: inline-flex; align-items: center; gap: 7px; }
.as-prof__line i { color: var(--as-violet); }
.as-prof__rating { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 0; color: var(--as-text-2); font-size: .92rem; }
.as-prof__rating b { color: var(--as-text); }
.as-stars-row { display: inline-flex; gap: 2px; color: #f5a524; }
.as-stars-row .fa-regular { color: var(--as-border-2); }

/* The report menu */
.as-prof .dropdown-menu {
    padding: 6px;
    border: 1px solid var(--as-border);
    border-radius: 12px;
    background: var(--as-surface);
    box-shadow: var(--as-shadow-lg);
}
.as-prof .dropdown-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; color: var(--as-text); font-weight: 600; }
.as-prof .dropdown-item:hover,
.as-prof .dropdown-item:focus { background: var(--as-surface-2); color: var(--as-text); }

/* Chat / Audio Call */
.as-prof__actions { display: grid; gap: 12px; }
.as-prof__act {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 72px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: 18px;
    color: var(--as-text) !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.as-prof__act--chat { background: var(--as-primary-soft); border-color: color-mix(in srgb, var(--as-primary) 45%, transparent); }
.as-prof__act--call { background: color-mix(in srgb, var(--as-violet) 12%, var(--as-surface)); border-color: color-mix(in srgb, var(--as-violet) 32%, transparent); }
a.as-prof__act:hover { transform: translateY(-2px); box-shadow: var(--as-shadow); }
a.as-prof__act:focus-visible { outline: none; box-shadow: var(--as-focus); }
.as-prof__act.is-closed { cursor: default; opacity: .72; filter: saturate(.55); }
.as-prof__acticon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--as-surface);
    color: var(--as-hl);
    font-size: 1.15rem;
    box-shadow: var(--as-shadow);
}
.as-prof__act--call .as-prof__acticon { color: var(--as-violet); }
.as-prof__actname { display: grid; font-family: var(--as-font-head); font-size: 1.08rem; font-weight: 700; line-height: 1.2; }
.as-prof__actname small { font-family: var(--as-font-body); font-size: .78rem; font-weight: 600; color: var(--as-muted); }
.as-prof__actprice {
    display: grid;
    justify-items: end;
    padding-left: 14px;
    border-left: 1px solid var(--as-border-2);
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
}
.as-prof__actprice del,
.as-prof__actprice small { font-size: .78rem; font-weight: 500; color: var(--as-muted); }

/* --------------------------------------------------------- the sections */
/* One column that cannot grow past the page: the week scrolls inside its card on phones. */
.as-prof-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-block: 18px clamp(36px, 5vw, 64px); }
.as-prof-body .as-card { border-radius: 22px; }
.as-prof-body .as-prof__h,
.as-prof .as-prof__h {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    font-size: 1.1rem;
    font-weight: 800;
}
.as-prof__hicon {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--as-primary-soft);
    color: var(--as-hl);
    font-size: .95rem;
}
.as-prof__cardhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.as-prof__cardhead .as-prof__h { margin: 0; }

.as-prof__about { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr) minmax(0, 1fr); overflow: hidden; }
.as-prof__about > div { padding: 22px; min-width: 0; }
.as-prof__about > div + div { border-left: 1px solid var(--as-border); }
.as-prof__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.as-prof__bio { margin: 0; color: var(--as-text-2); overflow-wrap: anywhere; }
.as-prof__none { margin: 0; color: var(--as-muted); font-size: .92rem; }
.as-prof__facts { display: grid; gap: 8px; margin: 0; }
.as-prof__facts > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--as-border); }
.as-prof__facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.as-prof__facts dt { font-weight: 500; color: var(--as-muted); }
.as-prof__facts dd { margin: 0; font-weight: 600; color: var(--as-text); text-align: right; overflow-wrap: anywhere; }

/* Gifts */
.as-prof__gifts,
.as-prof__week,
.as-prof__reviews { padding: 20px 22px; }
.as-prof__giftgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.as-prof__gift.loadGiftItem {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 4px;
    width: auto; /* a legacy rule gives .loadGiftItem a quarter of the row */
    min-width: 0;
    margin: 0; /* and 10px above and below: rows sat 28px apart */
    padding: 16px 8px 14px;
    border: 1px solid var(--as-border);
    border-radius: 16px;
    /* the page script paints the picked one light blue; the picked one is .is-selected here */
    background: var(--as-surface) !important;
    box-shadow: none !important;
    color: var(--as-text);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, border-color .2s ease;
}
.as-prof__gift:hover { border-color: var(--as-primary); transform: translateY(-2px); }
.as-prof__gift:focus-visible { outline: none; border-color: var(--as-primary); box-shadow: var(--as-focus) !important; }
.as-prof__gift img { width: 60px; height: 60px; object-fit: contain; }
/* A gift whose picture is missing: its icon in the same 60 px box. */
.as-prof__giftph { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 14px; background: var(--as-primary-soft); color: var(--as-hl); font-size: 1.6rem; }
.as-prof__giftname { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; font-weight: 700; }
.as-prof__giftprice { font-size: .85rem; font-weight: 600; color: var(--as-text-2); }
.as-prof__giftcheck { position: absolute; top: 8px; right: 8px; color: var(--as-primary-2); opacity: 0; transform: scale(.6); transition: opacity .2s ease, transform .2s ease; }
.as-prof__gift.loadGiftItem.is-selected {
    border-color: var(--as-primary);
    background: var(--as-primary-soft) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--as-primary) 45%, transparent) !important;
}
.as-prof__gift.is-selected .as-prof__giftcheck { opacity: 1; transform: none; }
.as-prof__giftsend { display: flex; justify-content: center; margin-top: 16px; }
/* app.min.css forces every span in a .loadGiftItem to 11px or 16px (!important): the gift's names and its
   placeholder icon take their own sizes back. */
.as-prof__gift.loadGiftItem .as-prof__giftname { font-size: .9rem !important; line-height: 1.3; }
.as-prof__gift.loadGiftItem .as-prof__giftprice { font-size: .85rem !important; line-height: 1.3; }
.as-prof__gift.loadGiftItem .as-prof__giftph { font-size: 1.5rem !important; line-height: 1; }
.as-prof__giftsend .as-btn { min-width: min(300px, 100%); }

/* The week */
.as-prof__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.as-prof__day {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 14px 8px;
    border: 1px solid var(--as-border);
    border-radius: 14px;
    background: var(--as-surface);
    text-align: center;
}
.as-prof__day strong { font-family: var(--as-font-head); color: var(--as-text); }
.as-prof__date { margin-bottom: 4px; font-size: .78rem; color: var(--as-muted); }
.as-prof__slot { display: block; padding: 6px 6px; border: 1px solid var(--as-border-2); border-radius: 999px; font-size: .76rem; font-weight: 600; color: var(--as-text-2); white-space: nowrap; }
.as-prof__slot.is-none { border-style: dashed; font-weight: 500; color: var(--as-muted); }
.as-prof__day.is-today { border-color: var(--as-primary); background: var(--as-primary-soft); }
.as-prof__day.is-today .as-prof__slot:not(.is-none) { border-color: var(--as-primary); color: var(--as-text); }
.as-prof__today { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--as-hl); }
/* The other days keep the label's line empty, so every day's hours sit on one line across the week. */
.as-prof__day:not(.is-today)::before { content: "Today"; visibility: hidden; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* Reviews */
.as-prof__avg { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.as-prof__revlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.as-prof__rev { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid var(--as-border); border-radius: 14px; }
.as-prof__rev img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--as-surface-2); }
.as-prof__rev strong { display: block; font-family: var(--as-font-head); color: var(--as-text); }
.as-prof__rev p { margin: 6px 0 0; font-size: .92rem; color: var(--as-text-2); overflow-wrap: anywhere; }
.as-prof__norev { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; text-align: left; }
.as-prof__norev > i { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--as-violet) 14%, transparent); color: var(--as-violet); font-size: 1.3rem; }
.as-prof__norev p { margin: 0; color: var(--as-muted); font-size: .9rem; }
.as-prof__norev strong { display: block; color: var(--as-text); }

/* The gift info modal's footer */
#giftInfoModal .modal-body ol { margin: 0; padding-left: 20px; color: var(--as-text-2); }
#giftInfoModal .modal-body li p { margin: 0 0 8px; }
#giftInfoModal .modal-footer { border-top: 1px solid var(--as-border); background: var(--as-surface); }
#giftInfoModal .modal-footer .btn {
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid var(--as-border-2);
    border-radius: 999px;
    background: transparent;
    color: var(--as-text);
    font-weight: 600;
}

/* ------------------------------------------------- an AI astrologer (docs/platform/ai-panel/PHASE1_BUILD.md 6.5) */
/* The chip after the name (no tick), the line under it, the provider line, the explainer to tap; no Experience column. */
.as-prof__name .as-badge--ai { flex: none; }
.as-prof__subtitle { font-weight: 600; color: var(--as-text); }
.as-ai-explainer { margin: 6px 0 0; font-size: .9rem; color: var(--as-text-2); }
.as-ai-explainer summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; color: var(--as-violet); }
.as-ai-explainer p { margin: 0 0 4px; max-width: 62ch; }
.as-prof__about.as-prof__about--ai { grid-template-columns: minmax(0, .85fr) minmax(0, 2.4fr); }
/* Where two actions sit side by side, an odd last one takes the whole row: an AI that offers chat alone (no Audio or
   Video Call for a service it does not have), or three - Chat, Audio Call and the Video Call of phase 4 (every human, an
   AI that offers both calls; docs/platform/ai-panel/PHASE3_BUILD.md 7.7). */
.as-prof__actions > .as-prof__act:nth-child(odd):last-child { grid-column: 1 / -1; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1199px) {
    .as-prof__days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .as-prof__head { grid-template-columns: minmax(0, 1fr); }
    .as-prof__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .as-prof__about { grid-template-columns: minmax(0, 1fr); }
    .as-prof__about > div + div { border-left: 0; border-top: 1px solid var(--as-border); }
    .as-prof__about.as-prof__about--ai { grid-template-columns: minmax(0, 1fr); }
    .as-prof__giftgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .as-prof__who { flex-direction: column; text-align: center; gap: 16px; }
    .as-prof__pic { width: 120px; height: 120px; }
    .as-prof__namerow,
    .as-prof__line,
    .as-prof__rating { justify-content: center; }
    .as-prof__actions { grid-template-columns: minmax(0, 1fr); }
    .as-prof__revlist { grid-template-columns: minmax(0, 1fr); }
    /* The week scrolls sideways inside its card. */
    .as-prof__days {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(132px, 40%);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }
    .as-prof__day { scroll-snap-align: start; }
    /* scrolls out to the card's edge, not to its padding */
    .as-prof__days { margin-inline: -22px; padding-inline: 22px; scroll-padding-inline: 22px; }
}
@media (max-width: 575px) {
    .as-prof__giftgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .as-prof__gift.loadGiftItem { padding: 12px 4px 10px; }
    .as-prof__gift img,
    .as-prof__giftph { width: 48px; height: 48px; }
    .as-prof__giftsend .as-btn { width: 100%; }
    .as-prof__days { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
    .as-prof__about > div,
    .as-prof__gifts,
    .as-prof__week,
    .as-prof__reviews { padding: 16px; }
}
