/* =============================================================
   WoW Bolivia — Character Page
   ============================================================= */

/* -------------------------------------------------------------
   Top bar
   ------------------------------------------------------------- */

.wb-char-top { padding: 4px 0; }

.wb-top-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 20px;
}

.wb-top-avatar img {
    width: 72px;
    height: auto;
    border-radius: 0;
    border: none;
    flex-shrink: 0;
}

.wb-top-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.wb-top-name-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0;
    line-height: 1.1;
}

.wb-char-title-prefix {
    font-size: 22px;
    font-weight: 700;
    color: #a0b4c8;
    margin-right: 4px;
}

.wb-char-name {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.wb-top-sub-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 13px;
    color: #a0b4c8;
}

.wb-top-dot { color: #3a5060; }
.wb-top-level { color: #c8d8e8; font-weight: 600; }
.wb-top-race  { color: #a0b4c8; }
.wb-top-class { color: #a0b4c8; }
.wb-top-realm { color: #5a7a90; }

.wb-top-guild {
    color: #f4bf2a;
    text-decoration: none;
    font-weight: 600;
}

.wb-top-badges-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.wb-ilvl-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #1a2a3a, #0d1e2e);
    border: 1px solid rgba(244, 191, 42, 0.5);
    color: #f4bf2a;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.wb-ilvl-icon {
    width: 16px;
    height: 16px;
    opacity: 0.85;
}

.wb-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #1a1a2a, #0d0d20);
    border: 1px solid rgba(160, 140, 220, 0.45);
    color: #c0b0f0;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.wb-rank-badge-icon {
    width: 18px;
    height: 18px;
}

/* -------------------------------------------------------------
   Character model / items panel
   ------------------------------------------------------------- */

.bg-faction {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.wb-char-model-panel .bg-faction {
    min-height: 340px;
    border-radius: 8px 8px 0 0;
    background-color: rgba(5, 12, 22, 0.6);
    background-blend-mode: multiply;
}

.wb-char-model-panel .col-items {
    width: 260px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
}

.wb-char-model-panel .col-main {
    width: calc(100% - 520px) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
}

/* Model viewer 3D */
#model-viewer-wrap {
    position: relative;
    display: block;
    width: 100%;
    height: 680px;
    overflow: hidden;
}

#model-viewer-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Fallback avatar cuando el CDN no tiene el mo3 */
.mv-fallback-avatar {
    display: none;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

#model-viewer-wrap.mv-unavailable .mv-fallback-avatar {
    display: flex;
}

#model-viewer-wrap.mv-unavailable canvas {
    opacity: 0;
}

.mv-fallback-avatar img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid rgba(244, 191, 42, 0.4);
    box-shadow: 0 0 30px rgba(244, 191, 42, 0.15);
}

.mv-level {
    position: absolute;
    bottom: 8px;
    right: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    z-index: 10;
    background: rgba(0,0,0,0.7);
    color: #f4bf2a;
}

/* -------------------------------------------------------------
   Items
   ------------------------------------------------------------- */

.item-slot {
    position: relative;
}

.item-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 5;
    position: relative;
    width: 100%;
}
.item-link:hover { text-decoration: none; }

.col-items-left .item-link  { flex-direction: row; }
.col-items-left .item-name  { text-align: left; }

.col-items-right .item-link { flex-direction: row-reverse; }
.col-items-right .item-name { text-align: right; }
.col-items-right .item-ilvl { text-align: right; }

.item-icon {
    width: 46px;
    height: 46px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid transparent;
    transition: box-shadow 0.25s cubic-bezier(.23,1,.32,1);
}

/* Bordes por calidad */
.border-q0 { border-color: #9d9d9d; }
.border-q1 { border-color: rgba(255,255,255,0.4); }
.border-q2 { border-color: #1eff00; }
.border-q3 { border-color: #0070dd; }
.border-q4 { border-color: #a335ee; }
.border-q5 { border-color: #ff8000; }
.border-q6 { border-color: #e6cc80; }
.border-q7 { border-color: #00ccff; }

.item-slot-empty {
    margin: 0;
    width: 100%;
    display: flex;
    align-items: center;
}
.col-items-left .item-slot-empty  { justify-content: flex-start; }
.col-items-right .item-slot-empty { justify-content: flex-end; }

.item-icon-empty {
    width: 46px;
    height: 46px;
    border-radius: 4px;
    flex-shrink: 0;
    opacity: 0.75;
}

.item-info {
    margin: 0 8px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-name {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

.item-ilvl {
    font-size: 10px;
    font-weight: 500;
    color: #7a90a0;
    line-height: 1.2;
    margin-top: 1px;
}

/* Quality colors */
.item-link.q0, .item-link.q0 .item-name { color: #9d9d9d; }
.item-link.q1, .item-link.q1 .item-name { color: #ffffff; }
.item-link.q2, .item-link.q2 .item-name { color: #1eff00; }
.item-link.q3, .item-link.q3 .item-name { color: #0070dd; }
.item-link.q4, .item-link.q4 .item-name { color: #a335ee; }
.item-link.q5, .item-link.q5 .item-name { color: #ff8000; }
.item-link.q6, .item-link.q6 .item-name { color: #e6cc80; }
.item-link.q7, .item-link.q7 .item-name { color: #00ccff; }

.item-link:hover .border-q0 { box-shadow: 0 0 10px 5px rgba(157,157,157,.7); }
.item-link:hover .border-q1 { box-shadow: 0 0 10px 5px rgba(255,255,255,.7); }
.item-link:hover .border-q2 { box-shadow: 0 0 10px 5px rgba(30,255,0,.7); }
.item-link:hover .border-q3 { box-shadow: 0 0 10px 5px rgba(0,112,221,.7); }
.item-link:hover .border-q4 { box-shadow: 0 0 10px 5px rgba(163,53,238,.7); }
.item-link:hover .border-q5 { box-shadow: 0 0 10px 5px rgba(255,128,0,.7); }
.item-link:hover .border-q6 { box-shadow: 0 0 10px 5px rgba(230,204,128,.7); }
.item-link:hover .border-q7 { box-shadow: 0 0 10px 5px rgba(0,204,255,.7); }

.item-transmo {
    position: absolute;
    bottom: -2px;
    right: -2px;
    display: block;
    z-index: 10;
}
.col-items-right .item-transmo { right: auto; left: -2px; }
.item-transmo img {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    box-shadow: 0 0 4px rgba(225,131,194,.8);
}

.item-spinner {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5a7a90;
    font-size: 20px;
}

/* Armas (col-bottom) */
.col-bottom {
    gap: 32px;
    padding-bottom: 20px;
    padding-top: 8px;
}

.col-bottom .item-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.col-bottom .item-slot-empty { width: auto; }

.col-bottom .item-link {
    flex-direction: column;
    align-items: center;
    width: auto;
}

.col-bottom .item-icon,
.col-bottom .item-icon-empty {
    width: 56px;
    height: 56px;
}

.weapon-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.col-bottom .item-info {
    margin: 4px 0 0;
    align-items: center;
}

.col-bottom .item-name {
    text-align: center;
    font-size: 10px;
    max-width: 120px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.2;
}

.col-bottom .item-ilvl { text-align: center; }

.weapon-left .item-link  { flex-direction: row-reverse; }
.weapon-left .item-info  { align-items: flex-end; width: 130px; flex-shrink: 0; margin-right: 8px; }
.weapon-left .item-name  { text-align: right; max-width: 130px; }
.weapon-left .item-ilvl  { text-align: right; }

.weapon-right .item-link { flex-direction: row; }
.weapon-right .item-info { align-items: flex-start; width: 130px; flex-shrink: 0; margin-left: 8px; }
.weapon-right .item-name { text-align: left; max-width: 130px; }
.weapon-right .item-ilvl { text-align: left; }

/* -------------------------------------------------------------
   Health / resource bars
   ------------------------------------------------------------- */

.wb-char-bar { padding: 4px 0; }

.wb-bar-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7a90a0;
}

.wb-bar-value {
    font-size: 13px;
    font-weight: 700;
    color: #c0d8e8;
}

.wb-progress {
    height: 8px !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-radius: 4px !important;
}

.wb-progress .progress-bar { border-radius: 4px !important; }

.bg-health  { background: #27cc4e !important; }
.bg-mana    { background: #1c8aff !important; }
.bg-rage    { background: #ab0000 !important; }
.bg-focus   { background: #d45719 !important; }
.bg-energy  { background: #cb9501 !important; }
.bg-runic   { background: #00bcde !important; }
.bg-fury    { background: #8400ff !important; }

/* -------------------------------------------------------------
   Section headers
   ------------------------------------------------------------- */

.wb-section-header {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #f4bf2a;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(244, 191, 42, 0.2);
}

.wb-section-body { padding: 0; }

.module-character .wb-table td {
    padding: 7px 10px;
    font-size: 13px;
    color: #a0b4c8;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.module-character .wb-table td:last-child {
    color: #e0e8f0;
    font-weight: 600;
    text-align: right;
}

.module-character .wb-table tr:hover td {
    background: rgba(2, 179, 234, 0.04);
}

/* -------------------------------------------------------------
   Class colors
   ------------------------------------------------------------- */

.color-c1  { color: #C69B3A !important; }
.color-c2  { color: #F58CBA !important; }
.color-c3  { color: #ABD473 !important; }
.color-c4  { color: #FFF569 !important; }
.color-c5  { color: #FFFFFF !important; }
.color-c6  { color: #C41F3B !important; }
.color-c7  { color: #0070DE !important; }
.color-c8  { color: #69CCF0 !important; }
.color-c9  { color: #9482C9 !important; }
.color-c11 { color: #FF7D0A !important; }

/* -------------------------------------------------------------
   Stat grid
   ------------------------------------------------------------- */

.wb-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.wb-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.wb-stat-card:hover {
    background: rgba(2, 179, 234, 0.06);
    border-color: rgba(2, 179, 234, 0.15);
}

.wb-stat-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.wb-stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wb-stat-val {
    font-size: 17px;
    font-weight: 800;
    color: #f4bf2a;
    line-height: 1.1;
}

.wb-stat-lbl {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4a6070;
    margin-top: 3px;
    line-height: 1.2;
}

/* -------------------------------------------------------------
   Professions
   ------------------------------------------------------------- */

.wb-prof-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.wb-prof-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wb-prof-icon {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    border: 1px solid rgba(244, 191, 42, 0.2);
    flex-shrink: 0;
}

.wb-prof-details {
    flex: 1;
    min-width: 0;
}

.wb-prof-name {
    font-size: 12px;
    font-weight: 700;
    color: #c0d8e8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wb-prof-value {
    font-size: 10px;
    font-weight: 600;
    color: #f4bf2a;
    white-space: nowrap;
}

/* -------------------------------------------------------------
   Responsive
   ------------------------------------------------------------- */

@media (max-width: 768px) {
    .wb-stat-grid { grid-template-columns: repeat(3, 1fr); }
    .wb-prof-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .wb-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .wb-prof-grid { grid-template-columns: 1fr; }
}
