/* ============================================================================
 * Dungeon Pages - Completionist Matrix Styles
 *
 * Scaled-down version of the original matrix, matching the original's
 * visual style (fonts, colors, text-shadows, image sizing, borders).
 *
 * Color scheme from original:
 *   Hero bg:    #3e5166
 *   Dungeon bg: #ac885c (implicit from images)
 *   Result bg:  #aaa
 *   Success:    #ef235c (pink-red)
 *   Failed:     red
 *   Campaign:   background image (Campaign-2-Dungeon-Pages.webp)
 *   Dungeon desc: #b9ff93 (green)
 *   Week labels: pink
 *   Borders:    2px solid #333
 *   Font:       Changa
 * ============================================================================ */

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

/* Wrapper */
.dp-tracker {
    margin: 20px 0;
    font-family: 'Changa', sans-serif;
}

.dp-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Table */
.dp-matrix {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

/* All cells get borders matching original */
.dp-matrix td {
    border: 2px solid #333;
    border-radius: 15px;
}

/* Column widths: first col ~22%, hero cols share remaining */
.dp-matrix td:first-child {
    width: 22%;
}

/* ===== Group Header Row ===== */
.dp-group-header {
    background: #3e5166;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 15px;
    text-align: center;
    text-shadow: 0 0 4px #3e5166, 0 0 4px #3e5166, 0 0 4px #3e5166, 0 0 4px #3e5166;
}

/* ===== Hero Header Cells ===== */
.dp-corner-cell {
    background: transparent;
    border-color: transparent !important;
}

.dp-hero-cell {
    background-color: #3e5166;
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center top;
    height: 120px;
    vertical-align: bottom;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.dp-hero-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
    padding: 6px 4px;
    box-sizing: border-box;
}

.dp-hero-name {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    text-shadow: 0 0 4px #3e5166, 0 0 4px #3e5166, 0 0 4px #3e5166, 0 0 4px #3e5166;
    line-height: 1;
    text-align: center;
}

.dp-hero-class {
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    text-shadow: 0 0 4px #3e5166, 0 0 4px #3e5166, 0 0 4px #3e5166, 0 0 4px #3e5166;
    text-align: center;
    line-height: 1.1;
    margin-top: 2px;
}

.dp-hero-bonus {
    color: pink;
    font-size: 0.5rem;
    font-weight: 400;
    text-shadow: 0 0 2px #000, 0 0 2px #000, 0 0 2px #000, 0 0 2px #000;
    text-align: center;
    line-height: 1.1;
    margin-top: 2px;
}

/* ===== Dungeon Row Header Cells ===== */
.dp-dungeon-cell {
    background-color: #ac885c;
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center;
    height: 100px;
    vertical-align: middle;
    padding: 0;
    position: relative;
    overflow: hidden;
    font-size: 20px;
    font-weight: 800;
    color: white;
    text-shadow: 0 0 4px #3e5166, 0 0 4px #3e5166, 0 0 4px #3e5166, 0 0 4px #3e5166;
}

.dp-dungeon-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 6px 8px;
    box-sizing: border-box;
    text-align: center;
}

.dp-dungeon-name {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    text-shadow: 0 0 4px #3e5166, 0 0 4px #3e5166, 0 0 4px #3e5166, 0 0 4px #3e5166;
    line-height: 1;
}

.dp-dungeon-desc {
    color: #b9ff93;
    font-size: 0.5rem;
    font-weight: 400;
    text-shadow: 0 0 2px #000, 0 0 2px #000, 0 0 2px #000, 0 0 2px #000;
    line-height: 1.2;
    margin-top: 4px;
    padding: 4px;
    background-image: url('/wp-content/uploads/2023/02/dark-25.webp');
}

.dp-dungeon-week {
    color: pink;
    font-size: 0.5rem;
    font-weight: 400;
    text-shadow: 0 0 2px #000, 0 0 2px #000, 0 0 2px #000, 0 0 2px #000;
    line-height: 1.1;
    margin-top: 2px;
}

/* ===== Result Cells ===== */
.dp-result-cell {
    background: #aaa;
    border-radius: 15px;
    height: 100px;
    vertical-align: middle;
    text-align: center;
    padding: 4px;
    position: relative;
    font-family: 'Changa', sans-serif;
}

.dp-result-cell.dp-campaign-cell {
    background: #ddd url('/wp-content/uploads/2023/02/Campaign-2-Dungeon-Pages.webp') no-repeat;
    background-size: contain;
    background-position: center;
}

/* Result content */
.dp-result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 0;
    padding-top: 10px;
}

.dp-outcome {
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
    text-shadow: 0 0 4px black, 0 0 4px black, 0 0 4px black, 0 0 4px black;
}

.dp-outcome-success {
    color: #ef235c;
}

.dp-outcome-failed {
    color: red;
}

.dp-xp-attempts {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    text-shadow: 0 0 4px black, 0 0 4px black, 0 0 4px black, 0 0 4px black;
    line-height: 1.2;
}

.dp-session-link {
    color: #17bafd;
    font-size: 0.6rem;
    font-weight: 600;
    text-decoration: none;
    text-shadow: 0 0 2px black, 0 0 2px black;
}

.dp-session-link:hover {
    text-decoration: underline;
}

/* ===== Group Spacer ===== */
.dp-group-spacer td {
    height: 10px;
    background: transparent;
    border-color: transparent !important;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .dp-hero-cell {
        height: 100px;
    }

    .dp-result-cell,
    .dp-dungeon-cell {
        height: 80px;
    }

    .dp-hero-name {
        font-size: 1.1rem;
    }

    .dp-outcome {
        font-size: 1.1rem;
    }

    .dp-xp-attempts {
        font-size: 0.65rem;
    }
}

@media (max-width: 768px) {
    .dp-hero-cell {
        height: 90px;
    }

    .dp-result-cell,
    .dp-dungeon-cell {
        height: 70px;
    }

    .dp-hero-name {
        font-size: 0.9rem;
    }

    .dp-dungeon-name {
        font-size: 0.7rem;
    }

    .dp-outcome {
        font-size: 0.9rem;
    }

    .dp-xp-attempts {
        font-size: 0.55rem;
    }
}
