/* Dashboard page only */

/* This is the scroll container for the tool area */
.dashboard-root {
    padding: 6px;
}

.dashboard-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

/* Section wrapper */
.subsection {
    overflow: hidden;
}

/* Clickable header */
.section-header {
    padding: 8px 12px;
    background-color: var(--iw-surface-muted);
    cursor: pointer;

    user-select: none;
}

.section-header:focus {
    outline: 2px solid var(--iw-focus-ring);
    outline-offset: 2px;
}

.section-header h2 {
    min-width: 0;
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.section-logo {
    width: 30px;
    height: auto;
    transition: filter 0.3s;
}

/* Content wrapper */
.section-content {
    padding: 12px;
}

/* Tool card */
.tool-card {
    padding: 14px;

    aspect-ratio: 2;
    max-width: 300px;
}

.tool-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    line-height: 1.2;
}

.tool-card p {
    margin: 0;
    line-height: 1.35;
}

/* Background image layer */
.tool-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--bg-image) no-repeat center center;
    background-size: cover;
    opacity: 0.15;
    z-index: 0;
}

/* Ensure text is above background */
.tool-card > * {
    position: relative;
    z-index: 1;
}

/* Collapsed section state */
.subsection.collapsed .section-content {
    display: none;
}

.subsection.collapsed .section-logo {
    filter: grayscale(100%);
}

@media (max-width: 480px) {
    .dashboard-root {
        padding: 2px;
    }

    .dashboard-sections {
        gap: 10px;
    }

    .section-header {
        padding: 8px 10px;
    }

    .section-content {
        padding: 10px;
    }

    .dashboard-cards {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        justify-content: stretch;
    }

    .tool-card h3 {
        font-size: 1rem;
    }
}
