/* D&D 4E Character Builder - Custom Styles */
/* Design system: "The Modern Archivist" (Editorial Character Sheet) */

/* ---- Icon font settings ---- */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ---- Interaction ---- */
.scale-98-active:active {
    transform: scale(0.98);
}

/* ---- Ghost border (subtle separator per DESIGN.md) ---- */
.ghost-border {
    outline: 1px solid rgba(172, 179, 180, 0.2);
}

/* ---- Clip-path shapes ---- */
.ability-shield {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.diamond-bg {
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.crest-bg {
    clip-path: polygon(0% 0%, 100% 0%, 100% 70%, 50% 100%, 0% 70%);
}

/* ---- Power card usage colors ---- */
.power-at-will {
    background-color: #3d7c47;
}

.power-encounter {
    background-color: #8b1a1a;
}

.power-daily {
    background-color: #4a4a4a;
}

/* ---- Print styles ---- */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white;
    }

    .print-border {
        border: 1px solid #acb3b4 !important;
    }

    .print-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0 !important;
    }

    .print-card {
        width: 2.5in !important;
        height: 3.5in !important;
        border: 1px dashed #ccc !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    @page {
        size: letter;
        margin: 0.5in;
    }
}

/* ---- View mode switcher (powers page) ---- */
body:not(.view-print-cards) .print-only {
    display: none;
}

body.view-print-cards .list-only {
    display: none;
}

body.view-print-cards .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

@media (min-width: 1024px) {
    body.view-print-cards .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

body.view-print-cards .power-card {
    height: 400px;
    display: flex;
    flex-direction: column;
    border: 1px solid #acb3b4;
}

body.view-print-cards .power-card-content {
    flex-grow: 1;
    overflow-y: auto;
}

/* ---- Blazor infrastructure ---- */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}
