/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */
 .ep-materials-wrapper.ep-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 340px));
    gap: 16px;
    align-items: stretch;
    justify-content: flex-start;
}

.ep-materials-wrapper.ep-grid-view .ep-material-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    border: 1px solid #e6ebf1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 20px rgb(14 23 38 / 5%);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    margin: 0 !important;
}

.ep-materials-wrapper.ep-grid-view .ep-material-card:hover {
    transform: translateY(-2px);
    border-color: #d7dfe9;
    box-shadow: 0 14px 28px rgb(14 23 38 / 9%);
}

.ep-materials-wrapper.ep-grid-view .ep-material-thumb {
    min-height: 170px;
    background: linear-gradient(180deg, #f7f9fb 0%, #eef3f8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ep-materials-wrapper.ep-grid-view .ep-material-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    line-height: normal;
    padding: 14px 14px 12px;
    flex: 1 1 auto;
}

.ep-material-title {
    font-weight: bold;
    font-size: 1rem;
    color: #333;
}

.ep-material-desc {
    font-size: 0.875rem;
    color: #666;
}

.ep-material-card .ep-material-actions {
    margin-top: 20px;
}

.ep-grid-material-icon svg {
    width: 52px;
    height: 52px;
    color: #2f3a4a;
}

.ep-list-material-icon svg {
    width: 28px;  
    height: 28px;  
}

.ep-material-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    border: 0;
    border-bottom: 1px solid #e6e6e8;
    border-radius: 0;
    padding: 14px 0;
    background: transparent;
    box-shadow: none;
}

.ep-material-row-main {
    display: flex;
    align-items: flex-start;
    flex: 1 1 auto;
    min-width: 0;
}

.ep-material-title-wrap {
    gap: 8px;
    min-width: 0;
}

.ep-material-row .ep-list-material-icon {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1f2937;
    line-height: 0;
}

.ep-material-row .ep-list-material-icon svg {
    width: 18px;
    height: 18px;
}

.ep-material-row .ep-material-meta {
    flex: 1 1 auto;
    min-width: 0;
}

.ep-material-file-meta {
    column-gap: 12px;
    row-gap: 2px;
    margin-top: 3px;
}

.ep-material-file-meta-item {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #6f7b88;
    white-space: nowrap;
    background-color: #f5f7f9;
    border: 1px solid #e7ecf2;
    padding: 2px 9px;
    border-radius: 999px;
}

.ep-material-file-meta-grid {
    margin-top: 2px;
}

.ep-materials-wrapper.ep-grid-view .ep-material-title {
    font-size: 1.08rem;
    line-height: 1.35;
    color: #1d2430;
    margin: 0;
}

.ep-materials-wrapper.ep-grid-view .ep-material-desc {
    font-size: 0.92rem;
    line-height: 1.5;
    color: #5c6674;
    margin-top: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.2em;
}

.ep-materials-wrapper.ep-grid-view .ep-material-card .ep-material-actions {
    margin-top: auto;
    padding-top: 4px;
}

.ep-materials-wrapper.ep-grid-view .ep-material-actions .ep-download-wrapper {
    width: 100%;
}

.ep-materials-wrapper.ep-grid-view .ep-material-actions .ep-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ep-material-row .ep-material-title {
    display: block;
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.3;
    color: #16181d;
}

.ep-material-row .ep-material-desc {
    margin-top: 6px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #5b616e;
    max-width: 70ch;
}

.ep-material-row .ep-material-desc.ep-content-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 3;
}

.ep-material-row .ep-material-actions {
    margin-top: 0;
    flex-shrink: 0;
    align-self: flex-start;
    width: auto;
    margin-left: 12px;
    padding-top: 2px;
}

.ep-material-row .ep-download-wrapper {
    display: flex;
    justify-content: flex-end;
}

.ep-material-row .ep-material-actions .ep-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    min-width: 0;
    padding-inline: 13px;
    padding-block: 4px;
    justify-content: center;
    white-space: nowrap;
}

.ep-material-download-icon {
    display: inline-flex;
    line-height: 0;
}

.ep-material-download-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.ep-material-desc-toggle {
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(var(--themeColor), 1);
    font-size: 0.84rem;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ep-material-desc-toggle:hover,
.ep-material-desc-toggle:focus {
    opacity: 0.85;
}

.ep-material-desc.ep-material-desc-expanded {
    -webkit-line-clamp: initial;
    display: block;
    overflow: visible;
}

button.ep-open-modal {
  position: relative !important;
  top: -50px !important;
}

.ep-info {
    margin-right: 10px !important;
}

.ep-file-type-icons{
    font-size: 20px;
}

.ep-material-lock-wrapper {
    position: relative;
    padding: 0;
}

.ep-material-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgb(241 241 241 / 94%);
    color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    cursor: not-allowed;
    pointer-events: unset;
}

.ep-material-lock-wrapper:hover .ep-material-lock-overlay {
    opacity: 1;
}

.ep-material-lock-icon {
    display: inline-flex;
    margin-bottom: 6px;
}

.ep-material-lock-icon svg {
    width: 24px;
    height: 24px;
}

.ep-material-lock-text {
    font-size: 13px;
    line-height: 1.4;
}

.ep-material-locked-btn {
    cursor: default;
}

.ep-materials-wrapper.ep-grid-view .ep-material-thumb img {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 170px !important;
    object-fit: cover;
    box-shadow: none;
}

.ep-cert-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ep-cert-card {
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
}

.ep-cert-meta {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #2c2c2c;
}

.ep-cert-attendee-row {
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ep-cert-attendee-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ep-cert-attendee-meta {
    flex: 1 1 220px;
}

.ep-cert-attendee-action {
    flex: 0 0 auto;
}

.ep-cert-attendee-action .ep-btn {
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .ep-materials-wrapper.ep-grid-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .ep-materials-wrapper.ep-grid-view {
        grid-template-columns: 1fr;
    }

    .ep-material-row {
        flex-direction: column;
        gap: 12px;
    }

    .ep-material-row .ep-material-actions {
        width: 100%;
    }

    .ep-material-row .ep-material-actions .ep-btn {
        width: 100%;
    }
}
