/* Guide Panel (docs/guide-system-design.md §4, mockup approved by the user 20 Nov 2026,
   claude.ai/artifact/8yF8tdmUNs1keKv8NCMa8D). Lives inside a #guide-panel-parent .flex-container,
   same fetch-fragment pattern as creator-dashboard-parent/rewards-parent - whose own card/stat/
   icon-wrap system this borrows wholesale, re-accented blue to match the Guide System's own
   established identity (the blue "Offer Assistance" button, the dark-blue guide name tag) instead
   of creator-dashboard's per-level palette. */

.interface.guide-panel-interface {
    width: 100%;
    max-width: 420px;
    text-align: center;
    padding: 0;
    border-radius: 10px;
}

.guide-panel-interface,
.guide-panel-interface *,
.guide-panel-interface *::before,
.guide-panel-interface *::after {
    box-sizing: border-box;
}

.guide-panel-interface .close-button {
    z-index: 5;
}

.guide-panel-interface {
    --gp-accent: #2f7de8;
    --gp-accent-deep: #1a4fa0;
}

/* ---------------------------------------------------------------------------
   Header
--------------------------------------------------------------------------- */
.guide-panel-header {
    position: relative;
    padding: 26px 26px 20px;
    background: linear-gradient(135deg, var(--gp-accent-deep) 0%, var(--gp-accent) 100%);
    color: #fff;
    border-radius: 7px 7px 0 0;
    text-align: left;
}

.guide-panel-crest {
    width: 60px;
    height: 59px;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px -4px #00000070, inset 0 0 0 2px #ffffff40;
    margin-bottom: 14px;
    padding: 6px;
}

/* Placeholder crest glyph - no dedicated Guide System badge art exists yet (same situation the
   Offer Assistance/End Session buttons started in before their own art was added), so this draws
   a simple compass inline rather than referencing a PNG that doesn't exist. Swap for real art the
   same way those buttons were swapped once it's ready. */
.guide-panel-crest svg {
    width: 34px;
    height: 34px;
}

.guide-panel-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #ffffffcc;
    margin: 0 0 4px;
}

.guide-panel-header h1 {
    margin: 0 0 10px;
    font-size: 25px;
    font-weight: 700;
    text-shadow: 0px 2px 1px #00000042;
}

.guide-panel-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff30;
    border: 1px solid #ffffff55;
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 5px 10px 5px 8px;
    border-radius: 100px;
}

.guide-panel-status-pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8aff8a;
    box-shadow: 0 0 0 3px #ffffff33;
}

.guide-panel-interface[data-on-duty="false"] .guide-panel-status-pill .dot {
    background: #cfd4dc;
}

/* ---------------------------------------------------------------------------
   Tabs - reuses the game-standard .ui-tabs-nav/.ui-tabs-panel (style.css), same as
   creator-dashboard.css/rewards-interface.html.
--------------------------------------------------------------------------- */
.guide-panel-interface > ul {
    margin: 14px 14px 0;
    padding: 0 0 0;
    width: calc(100% - 28px);
}

.guide-panel-interface .ui-tabs-nav {
    overflow-x: hidden;
}

.guide-panel-interface .ui-tabs-nav li {
    margin: 0 5px 0 0;
}

.guide-panel-interface .ui-tabs-nav li:last-of-type {
    margin-right: 0;
}

.guide-panel-interface .ui-tabs-nav li a {
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    padding: 10px 10px;
}

.guide-panel-tab-icon {
    display: inline-block;
    width: 15px;
    height: 15px;
    vertical-align: -2px;
    margin-right: 9px;
    background-color: #4c4c4c;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.guide-panel-tab-icon.icon-home { -webkit-mask-image: url('../images/ui-elements/icon-home.png'); mask-image: url('../images/ui-elements/icon-home.png'); }
.guide-panel-tab-icon.icon-history { -webkit-mask-image: url('../images/ui-elements/icon-table.png'); mask-image: url('../images/ui-elements/icon-table.png'); }

.guide-panel-interface .ui-tabs-nav li.ui-state-active .guide-panel-tab-icon {
    background-color: #fff;
}

.guide-panel-interface .ui-tabs-panel {
    display: block;
    height: auto;
    width: 100%;
    padding: 0 15px 15px 15px;
}

.guide-panel-interface .ui-tabs-nav li.ui-state-active a {
    background: var(--gp-accent-deep);
    color: #fff;
}

/* ---------------------------------------------------------------------------
   Body + cards
--------------------------------------------------------------------------- */
.guide-panel-body {
    padding: 0 5px 0 0;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    max-height: 60vh;
    overflow-y: auto;
}

.guide-panel-body::-webkit-scrollbar-track { background-color: #e7e9f2; border-radius: 5px; }
.guide-panel-body::-webkit-scrollbar-thumb { background-color: #000; border-radius: 4px; }
.guide-panel-body::-webkit-scrollbar { width: 5px; height: 5px; }

.guide-panel-card {
    background: #f7f8fc;
    border: 1px solid #e7e9f2;
    border-radius: 14px;
    padding: 16px 16px 17px;
}

.guide-panel-card > *:last-child { margin-bottom: 0; }

.guide-panel-card-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    font-size: 13.5px;
    font-weight: 700;
    color: #14141f;
    text-transform: uppercase;
}

.guide-panel-icon-wrap {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    border: 1px solid #00000030;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #fff;
}

.guide-panel-icon-wrap.blue { background: #e3edff; }
.guide-panel-icon-wrap.blue .guide-panel-icon { background-color: #2569f6; }
.guide-panel-icon-wrap.green { background: #d8fbe8; }
.guide-panel-icon-wrap.green .guide-panel-icon { background-color: #589b77; }
.guide-panel-icon-wrap.gold { background: #fbf0d9; }
.guide-panel-icon-wrap.gold .guide-panel-icon { background-color: #c98a1f; }

.guide-panel-icon {
    display: block;
    width: 14px;
    height: 14px;
    background-color: #4c4c4c;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.guide-panel-icon.icon-user     { -webkit-mask-image: url('../images/ui-elements/icon-user.png'); mask-image: url('../images/ui-elements/icon-user.png'); }
.guide-panel-icon.icon-group    { -webkit-mask-image: url('../images/ui-elements/icon-group.png'); mask-image: url('../images/ui-elements/icon-group.png'); }
.guide-panel-icon.icon-progress { -webkit-mask-image: url('../images/ui-elements/icon-progress.png'); mask-image: url('../images/ui-elements/icon-progress.png'); }
.guide-panel-icon.icon-exam     { -webkit-mask-image: url('../images/ui-elements/icon-exam.png'); mask-image: url('../images/ui-elements/icon-exam.png'); }

/* Real star icon - same crop the Doodle Den celebration burst uses (reusable.js's
   celebrationStarBurst, public/css/reward-alert.css's .rewards-star-burst-piece), reused here
   per the user's own direction rather than a drawn/unicode star. Scaled down from the native
   29x28 crop (0.6x) - box size, background-size, and background-position all scaled by the same
   ratio so the crop stays aligned. */
.guide-panel-mini-star {
    display: inline-block;
    width: 17px;
    height: 17px;
    vertical-align: -5px;
    background-image: url('../images/ui-elements/reward-system-icon-spritesheet.png');
    background-size: 252px 60px;
    background-position: -191px -6px;
    background-repeat: no-repeat;
}

/* ---------------------------------------------------------------------------
   Duty status card
--------------------------------------------------------------------------- */
.guide-panel-duty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
    border: 1px solid #e7e9f2;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.guide-panel-duty-row .label {
    font-size: 10.5px;
    color: #75758c;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    margin-bottom: 3px;
}

.guide-panel-duty-row .value {
    font-size: 15px;
    font-weight: 800;
    color: #14141f;
}

.guide-panel-interface[data-on-duty="true"] .guide-panel-duty-row .value { color: #0e9161; }

.guide-panel-duty-toggle-btn {
    flex-shrink: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 8px;
    padding: 9px 14px;
    cursor: pointer;
    border: none;
    color: #fff;
}

.guide-panel-interface[data-on-duty="true"] .guide-panel-duty-toggle-btn { background: #d85254; }
.guide-panel-interface[data-on-duty="true"] .guide-panel-duty-toggle-btn:hover { background: #fd7173; }
.guide-panel-interface[data-on-duty="false"] .guide-panel-duty-toggle-btn { background: #0e9161; }
.guide-panel-interface[data-on-duty="false"] .guide-panel-duty-toggle-btn:hover { background: #26b17d; }

.guide-panel-footnote {
    font-size: 12px;
    color: #6d6d81;
    line-height: 1.5;
    margin: 0;
}

/* ---------------------------------------------------------------------------
   Active session card
--------------------------------------------------------------------------- */
.guide-panel-session-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e7e9f2;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.guide-panel-session-avatar {
    width: 34px;
    height: 34px;
	line-height: 34px;
    border-radius: 50%;
    background: var(--gp-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.guide-panel-session-info { flex: 1; min-width: 0; }
.guide-panel-session-info .uname { font-size: 14px; font-weight: 700; color: #14141f; }
.guide-panel-session-info .meta {
    font-size: 11.5px;
    color: #75758c;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.guide-panel-session-actions { display: flex; gap: 8px; }

.guide-panel-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 8px;
    padding: 9px 8px;
    cursor: pointer;
    border: none;
    color: #fff;
}

.guide-panel-btn-icon {
    display: inline-block;
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    /* nudge up 1px - uppercase text has no descenders, so its visual center sits above the flex
       box's true center, while this icon (flex-centered exactly) looks low next to it otherwise */
    margin-top: -1px;
    background-color: #fff;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.guide-panel-btn-icon.teleport { -webkit-mask-image: url('../images/ui-elements/icon-arrow-right.png'); mask-image: url('../images/ui-elements/icon-arrow-right.png'); }
.guide-panel-btn-icon.end { -webkit-mask-image: url('../images/ui-elements/icon-stop.png'); mask-image: url('../images/ui-elements/icon-stop.png'); }

.guide-panel-action-btn.teleport { background: var(--gp-accent); }
.guide-panel-action-btn.teleport:hover { background: var(--gp-accent-deep); }
.guide-panel-action-btn.teleport:disabled { background: #c7cadb; cursor: not-allowed; }
.guide-panel-action-btn.end { background: #d85254; }
.guide-panel-action-btn.end:hover { background: #fd7173; }

.guide-panel-empty-state {
    text-align: center;
    padding: 18px 10px;
    color: #75758c;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* ---------------------------------------------------------------------------
   History tab - stat row + session list
--------------------------------------------------------------------------- */
.guide-panel-stat-row { display: flex; gap: 10px; }

.guide-panel-stat {
    flex: 1;
    background: #fff;
    border: 1px solid #e7e9f2;
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
}

.guide-panel-stat .label {
    font-size: 9.5px;
    color: #75758c;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
    margin-bottom: 3px;
}

.guide-panel-stat .value {
    font-size: 17px;
    font-weight: 800;
    color: #14141f;
    font-variant-numeric: tabular-nums;
}

.guide-panel-stat .value.accent { color: var(--gp-accent-deep); }

.guide-panel-history-list {
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 3px;
}

.guide-panel-history-list::-webkit-scrollbar-track { background-color: #e7e9f2; border-radius: 5px; }
.guide-panel-history-list::-webkit-scrollbar-thumb { background-color: #000; border-radius: 4px; }
.guide-panel-history-list::-webkit-scrollbar { width: 5px; }

.guide-panel-history-row {
    background: #fff;
    border: 1px solid #e7e9f2;
    border-radius: 10px;
    padding: 9px 11px;
}

.guide-panel-history-row-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.guide-panel-history-row .uname { font-size: 13px; font-weight: 700; color: #14141f; flex: 1; min-width: 0; }
.guide-panel-history-row .date { font-size: 11px; color: #75758c; flex-shrink: 0; }
.guide-panel-history-row .meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }

/* Pill design mirrors #chat-tabs .chat-tab (rounded box, bg color, 1px border) - one color per
   element so location/time/rating stay visually distinct at a glance instead of running together
   as middot-separated text. */
.guide-panel-history-row .meta-pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    padding: 2px 7px;
    border-radius: 6px;
    line-height: 1.5;
}

.guide-panel-history-row .meta-pill.location { background: #eef2fe; border: 1px solid #c7d4f7; color: #3657b5; }
.guide-panel-history-row .meta-pill.time { background: #eafaf0; border: 1px solid #bfe8d0; color: #1f8a52; }
.guide-panel-history-row .meta-pill.rating { background: #fff6e3; border: 1px solid #f3dca0; color: #a9780a; }
.guide-panel-history-row .note {
    font-size: 11.5px;
    color: #4a4f5c;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed #e7e9f2;
    font-style: italic;
}

/* ---------------------------------------------------------------------------
   Responsive - same breakpoints as creator-dashboard.css
--------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .guide-panel-header { padding: 18px 18px 10px; }
    .guide-panel-eyebrow { display: none; }
    .guide-panel-crest { float: left; margin-right: 9px; width: 48px; height: 48px; }
    .guide-panel-crest svg { width: 26px; height: 26px; }
    .guide-panel-header h1 { font-size: 18px; margin: 6px 0 4px; }
    .guide-panel-status-pill { font-size: 10px; }
}

@media (max-width: 480px) {
    .interface.guide-panel-interface { max-width: min(380px, calc(100vw - 33px)); }
    .guide-panel-stat-row { flex-wrap: wrap; }
    .guide-panel-stat { flex-basis: calc(50% - 5px); }
}

@media (max-width: 420px) {
    .guide-panel-session-actions { flex-direction: column; }
}
