/* Resources & Toolkit Pages - Print-friendly, interactive templates */

/* ===== Resource Page Header ===== */
.resource-header {
    text-align: center;
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.resource-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.resource-meta {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.resource-meta .tag {
    background: var(--accent);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Download button */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent), #6366F1);
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 16px;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}

.btn-download svg {
    width: 18px;
    height: 18px;
}

/* ===== Checklist Styles ===== */
.checklist-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.checklist-section h2 {
    font-size: 1.15rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.checklist-section h2 .section-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent), #6366F1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
    flex-shrink: 0;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent);
    flex-shrink: 0;
    cursor: pointer;
}

.checklist-item label {
    flex: 1;
    line-height: 1.5;
    cursor: pointer;
}

.checklist-item label strong {
    color: var(--text-primary);
}

.checklist-item label span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ===== Template / Worksheet Styles ===== */
.template-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.9rem;
}

.template-table th,
.template-table td {
    padding: 12px 16px;
    text-align: left;
    border: 1px solid var(--border);
}

.template-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.template-table td {
    background: var(--bg-primary);
}

.template-table td.editable {
    background: rgba(99, 102, 241, 0.04);
    border-style: dashed;
    min-width: 120px;
}

.template-table td.editable:focus {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    background: rgba(99, 102, 241, 0.08);
}

.template-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Score / Rating cells */
.template-table td.score {
    text-align: center;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

/* ===== Maturity Model ===== */
.maturity-level {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.maturity-level::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.maturity-level.level-1::before {
    background: #EF4444;
}

.maturity-level.level-2::before {
    background: #F59E0B;
}

.maturity-level.level-3::before {
    background: #3B82F6;
}

.maturity-level.level-4::before {
    background: #10B981;
}

.maturity-level.level-5::before {
    background: #8B5CF6;
}

.maturity-level h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.maturity-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.level-1 .maturity-badge {
    background: #EF4444;
}

.level-2 .maturity-badge {
    background: #F59E0B;
}

.level-3 .maturity-badge {
    background: #3B82F6;
}

.level-4 .maturity-badge {
    background: #10B981;
}

.level-5 .maturity-badge {
    background: #8B5CF6;
}

.maturity-criteria {
    list-style: none;
    padding: 0;
    margin: 0;
}

.maturity-criteria li {
    padding: 6px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.maturity-criteria li::before {
    content: '○';
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* ===== Calculator / Interactive ===== */
.calc-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.calc-section h3 {
    margin-bottom: 16px;
}

.calc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-wrap: wrap;
}

.calc-row:last-child {
    border-bottom: none;
}

.calc-label {
    flex: 1;
    min-width: 200px;
}

.calc-label strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.calc-label small {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.calc-input {
    width: 140px;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'JetBrains Mono', monospace;
    text-align: right;
}

.calc-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.calc-result {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-top: 16px;
}

.calc-result .result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.calc-result .result-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* ===== Comparison Matrix ===== */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin: 16px 0;
}

.comparison-table th {
    background: var(--bg-secondary);
    padding: 12px;
    text-align: center;
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
}

.comparison-table th:first-child {
    text-align: left;
    min-width: 180px;
}

.comparison-table td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: center;
}

.comparison-table td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--text-primary);
}

.comparison-table tbody tr:hover td {
    background: rgba(99, 102, 241, 0.04);
}

/* Rating indicators */
.rating-full {
    color: #10B981;
}

.rating-partial {
    color: #F59E0B;
}

.rating-none {
    color: #6B7280;
}

/* ===== Cheatsheet Styles ===== */
.cheatsheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.cheatsheet-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.cheatsheet-card h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cheatsheet-card h3 .emoji {
    font-size: 1.2rem;
}

.cheatsheet-card pre {
    background: var(--bg-code);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 14px;
    font-size: 0.8rem;
    overflow-x: auto;
    margin: 10px 0;
}

.cheatsheet-card code {
    font-family: 'JetBrains Mono', monospace;
    color: #e2e8f0;
}

.cheatsheet-card ul {
    padding-left: 16px;
    margin: 8px 0;
}

.cheatsheet-card ul li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 3px 0;
}

.tip-callout {
    background: rgba(16, 185, 129, 0.08);
    border-left: 3px solid #10B981;
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    margin: 10px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.warning-callout {
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid #EF4444;
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    margin: 10px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===== Resources Hub Grid ===== */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.resource-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.resource-card-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent), #6366F1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.3rem;
}

.resource-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.resource-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex: 1;
    line-height: 1.6;
}

.resource-card-meta {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.resource-card-meta span {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    font-weight: 500;
}

/* ===== Progress tracker ===== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #6366F1);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
}

/* ===== Print Styles ===== */
@media print {

    .docs-header,
    .docs-sidebar,
    .docs-footer-nav,
    .btn-download,
    .sidebar-toggle,
    .sidebar-backdrop,
    .breadcrumbs {
        display: none !important;
    }

    .docs-main {
        margin-left: 0 !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    .docs-content {
        max-width: 100% !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .checklist-section,
    .maturity-level,
    .calc-section,
    .cheatsheet-card {
        break-inside: avoid;
        border-color: #ccc !important;
        background: white !important;
    }

    .template-table th {
        background: #f0f0f0 !important;
    }

    h1,
    h2,
    h3,
    h4 {
        color: black !important;
    }

    p,
    li,
    label,
    td {
        color: #333 !important;
    }

    .resource-header {
        border-bottom-color: #ccc !important;
    }

    a {
        color: black !important;
        text-decoration: none !important;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .cheatsheet-grid {
        grid-template-columns: 1fr;
    }

    .resources-grid {
        grid-template-columns: 1fr;
    }

    .calc-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .calc-input {
        width: 100%;
    }

    .comparison-table {
        font-size: 0.75rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 6px 8px;
    }

    .resource-header h1 {
        font-size: 1.5rem;
    }

    .template-table {
        font-size: 0.8rem;
    }

    .template-table th,
    .template-table td {
        padding: 8px 10px;
    }
}