/*
 * Emergent Course Manager front-end structure.
 * Typography, text colours and button appearance are intentionally inherited
 * from the active WordPress theme or surrounding Divi module.
 */
.ecm-resource-library,
.ecm-resource-library * {
    box-sizing: border-box;
}

.ecm-resource-library {
    font-family: inherit;
    color: inherit;
}

.ecm-resource-group {
    margin: 0 0 1.75em;
}

.ecm-resource-group:last-child {
    margin-bottom: 0;
}

.ecm-resource-group-title,
.ecm-resource-title,
.ecm-resource-description,
.ecm-resource-action {
    font-family: inherit;
    color: inherit;
}

.ecm-resource-group-title {
    margin-top: 0;
}

.ecm-resource-list {
    display: grid;
    gap: 0.75em;
}

.ecm-resource-card {
    padding: 1em;
    border: 1px solid currentColor;
    border-radius: 0.375em;
}

.ecm-resource-title {
    margin-top: 0;
}

.ecm-resource-description > :last-child,
.ecm-resource-action {
    margin-bottom: 0;
}

.ecm-resource-link {
    font-family: inherit;
}


/* Per-resource colours are optional and are applied inline from the course editor. */
.ecm-resource-card[style] .ecm-resource-title,
.ecm-resource-card[style] .ecm-resource-title a,
.ecm-resource-card[style] .ecm-resource-description,
.ecm-resource-card[style] .ecm-resource-description p {
    color: inherit;
}

.ecm-resource-audio {
    margin-top: 0.75em;
}

.ecm-resource-audio .wp-audio-shortcode {
    width: 100% !important;
}


/* Access-denied content is rendered inside the normal theme/Divi page template. */
.ecm-denied,
.ecm-denied * {
    box-sizing: border-box;
}

.ecm-denied {
    max-width: 760px;
    margin: 3.75em auto;
    padding: 2em;
    text-align: center;
    font-family: inherit;
    color: inherit;
}

.ecm-denied-brand,
.ecm-denied-heading,
.ecm-denied-course,
.ecm-denied-message,
.ecm-denied-help,
.ecm-denied-button {
    font-family: inherit;
    color: inherit;
}

.ecm-denied-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.625em;
    margin-top: 1.5em;
}

.ecm-denied-button {
    display: inline-block;
    padding: 0.75em 1.25em;
    text-decoration: none;
}
