.acl-resource-grid-public {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)) !important;
    align-items: start !important;
    gap: 24px !important;
}

.acl-resource-grid-public .acl-resource-card {
    position: relative !important;
    display: flex !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 3px solid #050505 !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 6px 6px 0 #050505 !important;
    color: #050505 !important;
    transition: transform .18s ease !important;
}

.acl-resource-grid-public .acl-resource-card:hover {
    transform: translateY(-4px) !important;
}

.acl-resource-card__media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 3px solid #050505;
    background: #f2f2f4;
}

.acl-resource-card__media img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: cover !important;
}

.acl-resource-grid-public .acl-resource-card__body {
    display: flex !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 22px !important;
}

.acl-resource-grid-public .acl-resource-badge {
    align-self: flex-start !important;
    margin: 0 0 14px !important;
    padding: 6px 12px !important;
    border: 2px solid #050505 !important;
    border-radius: 999px !important;
    background: #d32123 !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
}

.acl-resource-grid-public .acl-resource-card h3 {
    margin: 0 0 18px !important;
    color: #050505 !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
}

.acl-resource-card__detail-link {
    color: #050505 !important;
    text-decoration: none !important;
}

.acl-resource-actions-public {
    position: relative;
    z-index: 2;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 0 !important;
}

.acl-resource-primary,
.acl-resource-secondary {
    display: inline-flex !important;
    min-height: 46px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 18px !important;
    border: 2px solid #050505 !important;
    border-radius: 999px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: 3px 3px 0 #050505 !important;
}

.acl-resource-primary {
    flex: 1 1 210px;
    background: #d32123 !important;
    color: #fff !important;
}

.acl-resource-secondary {
    flex: 1 1 150px;
    background: #050505 !important;
    color: #fff !important;
}

.acl-resource-primary:link,
.acl-resource-primary:visited,
.acl-resource-primary:hover,
.acl-resource-primary:focus,
.acl-resource-secondary:link,
.acl-resource-secondary:visited,
.acl-resource-secondary:hover,
.acl-resource-secondary:focus {
    color: #fff !important;
}

.acl-resource-primary:hover,
.acl-resource-secondary:hover {
    transform: translateY(-2px) !important;
}

.acl-resource-empty {
    padding: 28px;
    border: 2px dashed #9ca3af;
    border-radius: 18px;
    background: #fff;
    color: #4b5563;
    font-weight: 700;
    text-align: center;
}

#tab-my-resources .acl-resource-grid-public {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (max-width: 900px) {
    #tab-my-resources .acl-resource-grid-public,
    .acl-resource-grid-public {
        grid-template-columns: 1fr !important;
    }
}

/* Dashboard resource actions v2.2.4: the dashboard/theme has broad anchor
 * color rules, so lock brand buttons and badges to accessible white text. */
html body #tab-my-resources .acl-resource-grid-public .acl-resource-badge,
html body #tab-my-resources .acl-resource-grid-public a.acl-resource-primary,
html body #tab-my-resources .acl-resource-grid-public a.acl-resource-secondary,
html body #tab-my-resources .acl-resource-grid-public a.acl-resource-primary:link,
html body #tab-my-resources .acl-resource-grid-public a.acl-resource-primary:visited,
html body #tab-my-resources .acl-resource-grid-public a.acl-resource-primary:hover,
html body #tab-my-resources .acl-resource-grid-public a.acl-resource-primary:focus,
html body #tab-my-resources .acl-resource-grid-public a.acl-resource-secondary:link,
html body #tab-my-resources .acl-resource-grid-public a.acl-resource-secondary:visited,
html body #tab-my-resources .acl-resource-grid-public a.acl-resource-secondary:hover,
html body #tab-my-resources .acl-resource-grid-public a.acl-resource-secondary:focus {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-shadow: none !important;
}

html body #tab-my-resources .acl-resource-grid-public a.acl-resource-primary {
    background: #d32123 !important;
}

html body #tab-my-resources .acl-resource-grid-public a.acl-resource-secondary {
    background: #050505 !important;
}

/* Fallback for dashboard builders that render the same resource cards outside
 * the tab wrapper. These class names belong only to the digital-product module,
 * so the rule cannot recolor course or lesson actions. */
html body .acl-resource-grid-public .acl-resource-badge,
html body .acl-resource-grid-public a.acl-resource-primary,
html body .acl-resource-grid-public a.acl-resource-secondary,
html body .acl-resource-grid-public a.acl-resource-primary:link,
html body .acl-resource-grid-public a.acl-resource-primary:visited,
html body .acl-resource-grid-public a.acl-resource-primary:hover,
html body .acl-resource-grid-public a.acl-resource-primary:focus,
html body .acl-resource-grid-public a.acl-resource-secondary:link,
html body .acl-resource-grid-public a.acl-resource-secondary:visited,
html body .acl-resource-grid-public a.acl-resource-secondary:hover,
html body .acl-resource-grid-public a.acl-resource-secondary:focus {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-shadow: none !important;
}

html body .acl-resource-grid-public a.acl-resource-primary {
    background: #d32123 !important;
}

html body .acl-resource-grid-public a.acl-resource-secondary {
    background: #050505 !important;
}
