/* ============================================================
   Chronicle — SlashGGRO  |  FluxCP Light Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&display=swap');

/* ── Page ─────────────────────────────────────────────────── */
.chronicle-page {
    max-width: 1100px;
    margin: 16px auto;
    padding: 0 12px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #333;
}

/* ── Section heading (matches FluxCP h2/h3 style) ─────────── */
.chr-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #336699;
    border-bottom: 2px solid #c8d8e8;
    padding-bottom: 4px;
    margin: 0 0 12px;
}

/* ── Main layout ──────────────────────────────────────────── */
.chronicle-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 14px;
    align-items: start;
}

/* ── FluxCP-style panel ───────────────────────────────────── */
.chr-panel {
    background: #fff;
    border: 1px solid #c8d8e8;
    border-radius: 4px;
    margin-bottom: 14px;
    overflow: hidden;
}

.chr-panel-head {
    background: linear-gradient(180deg, #ddeeff 0%, #c8d8e8 100%);
    border-bottom: 1px solid #b0c8dc;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chr-panel-head h3 {
    margin: 0;
    font-size: 12px;
    font-weight: bold;
    color: #336699;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.chr-panel-body {
    padding: 12px;
}

/* ── Profile card ─────────────────────────────────────────── */
.chr-profile-wrap {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px;
}

.chr-sprite-box {
    width: 110px;
    flex-shrink: 0;
    text-align: center;
}

.chr-sprite-box img {
    max-width: 110px;
    image-rendering: pixelated;
}

.chr-sprite-placeholder {
    width: 80px;
    height: 110px;
    background: #eef3f8;
    border: 1px solid #c8d8e8;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 28px;
    margin: 0 auto;
}

.chr-profile-info {
    flex: 1;
    min-width: 0;
}

.chr-char-name {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 700;
    color: #1a3a5c;
    margin: 0 0 8px;
    line-height: 1.2;
}

.chr-guild-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.chr-guild-emblem {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
}

.chr-guild-name {
    font-size: 12px;
    color: #555;
    font-style: italic;
}

.chr-meta-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.chr-meta-table td {
    padding: 3px 0;
    vertical-align: top;
}

.chr-meta-table td:first-child {
    color: #888;
    width: 70px;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: .06em;
    padding-top: 5px;
}

.chr-meta-table td:last-child {
    font-weight: bold;
    color: #333;
}

/* ── Equipment grid ───────────────────────────────────────── */
.chr-equip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 10px;
}

.chr-equip-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f8fc;
    border: 1px solid #d8e8f0;
    border-radius: 4px;
    padding: 7px 9px;
    min-height: 52px;
    transition: border-color .12s, background .12s;
}

.chr-equip-cell:hover {
    border-color: #7aaac8;
    background: #eef4fa;
}

.chr-equip-cell.empty {
    opacity: .45;
}

.chr-equip-icon-wrap {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #d0dde8;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chr-equip-icon-wrap img {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
}

.chr-equip-icon-placeholder {
    font-size: 14px;
    color: #bbb;
}

.chr-equip-text {
    flex: 1;
    min-width: 0;
}

.chr-equip-slot-lbl {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #999;
    margin-bottom: 2px;
    line-height: 1;
}

.chr-equip-item-name {
    font-size: 12px;
    font-weight: bold;
    color: #1a3a5c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.chr-equip-item-name.empty { color: #bbb; font-weight: normal; font-style: italic; }

.chr-refine { color: #cc6600; font-weight: bold; margin-right: 2px; }
.chr-refine.high { color: #cc2200; }
.chr-refine.mid  { color: #cc8800; }

.chr-card-pips {
    display: flex;
    gap: 2px;
    margin-top: 3px;
}

.chr-card-pip {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: #dde;
    border: 1px solid #bbc;
}

.chr-card-pip.filled {
    background: #7a9cc0;
    border-color: #4a7aaa;
}

/* ── Activity feed ────────────────────────────────────────── */
.chr-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chr-feed-card {
    background: #fff;
    border: 1px solid #c8d8e8;
    border-radius: 4px;
    overflow: hidden;
}

.chr-feed-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 6px;
    background: #f5f8fc;
    border-bottom: 1px solid #e0eaf4;
}

.chr-feed-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a7aaa, #2a4a6a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}

.chr-feed-name {
    font-weight: bold;
    font-size: 12px;
    color: #336699;
    line-height: 1.2;
}

.chr-feed-time {
    font-size: 11px;
    color: #999;
}

.chr-feed-map-tag {
    margin-left: auto;
    background: #ddeeff;
    border: 1px solid #b0c8dc;
    border-radius: 3px;
    padding: 1px 7px;
    font-size: 10px;
    color: #336699;
    font-family: monospace;
    white-space: nowrap;
}

.chr-feed-body {
    padding: 7px 10px 0;
    font-size: 12px;
    color: #555;
}

.chr-feed-kill {
    margin: 6px 10px 10px;
    background: #fff8f8;
    border: 1px solid #f0d8d8;
    border-left: 3px solid #cc4444;
    border-radius: 4px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chr-feed-kill-icon { font-size: 18px; flex-shrink: 0; }

.chr-feed-kill-type {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #999;
    margin-bottom: 2px;
}

.chr-feed-kill-name {
    font-size: 13px;
    font-weight: bold;
    color: #cc3333;
}

.chr-feed-kill-sub {
    font-size: 11px;
    color: #999;
    margin-top: 1px;
}

/* ── Empty state ──────────────────────────────────────────── */
.chr-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
    font-size: 12px;
}

/* ── Search form ──────────────────────────────────────────── */
.chr-search-wrap {
    padding: 12px;
}

.chr-search-row {
    display: flex;
    gap: 6px;
}

.chr-search-input {
    flex: 1;
    border: 1px solid #b0c8dc;
    border-radius: 3px;
    padding: 6px 10px;
    font-size: 13px;
    color: #333;
    background: #fff;
    outline: none;
}

.chr-search-input:focus { border-color: #7aaac8; }

.chr-search-btn {
    background: linear-gradient(180deg, #5588bb 0%, #336699 100%);
    border: 1px solid #2a5580;
    border-radius: 3px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.chr-search-btn:hover {
    background: linear-gradient(180deg, #6699cc 0%, #4477aa 100%);
}

/* ── Search results ───────────────────────────────────────── */
.chr-results-list { display: flex; flex-direction: column; }

.chr-result-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 9px 12px !important;
    border-bottom: 1px solid #e8f0f8 !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: background .1s;
}

.chr-result-row:last-child { border-bottom: none !important; }
.chr-result-row:hover { background: #f0f6fc !important; }

.chr-result-avatar {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #5588bb, #2a5580) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 14px !important;
    color: #fff !important;
    flex-shrink: 0 !important;
    font-family: Arial, sans-serif !important;
}

.chr-result-info {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-width: 0 !important;
}

.chr-result-name {
    font-weight: bold !important;
    font-size: 13px !important;
    color: #336699 !important;
    margin-bottom: 2px !important;
    display: block !important;
}

.chr-result-meta {
    font-size: 11px !important;
    color: #888 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-wrap: wrap !important;
}

.chr-result-arrow {
    color: #aac8e0 !important;
    font-size: 14px !important;
}

.chr-result-row:hover .chr-result-arrow { color: #336699 !important; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 860px) {
    .chronicle-layout { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .chr-equip-grid { grid-template-columns: 1fr; }
}
