/* Container layouts */
.edm-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.edm-docs-grid .edm-doc-item {
    flex: 1 1 220px;
    max-width: 260px;
}

.edm-docs-list {
    flex-direction: column;
}

.edm-docs-list .edm-doc-item {
    width: 100%;
    max-width: 100%;
}

/* Card */
.edm-doc-item {
    list-style: none;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    padding: 20px 18px 18px;
    box-sizing: border-box;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.edm-doc-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
    border-color: rgba(59, 130, 246, 0.65);
}

/* Thumbnail / icon */
.edm-doc-thumb-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.edm-doc-thumb {
    max-width: 72px;
    max-height: 72px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.edm-doc-icon {
    font-size: 46px;
    width: 46px;
    height: 46px;
    line-height: 46px;
    text-align: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #e5e7eb, #f9fafb);
    color: #0f172a;
}

.edm-doc-icon-pdf {
    background: linear-gradient(135deg, #f97373, #ef4444);
    color: #ffffff;
}

.edm-doc-icon-word {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
}

.edm-doc-icon-excel {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
}

.edm-doc-icon-ppt {
    background: linear-gradient(135deg, #fb923c, #f97316);
    color: #ffffff;
}

/* Title typography */
.edm-doc-title {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #0f172a;
}

.edm-doc-title a {
    color: inherit;
    text-decoration: none;
}

.edm-doc-title a:hover {
    text-decoration: underline;
}

/* Download button */
.edm-doc-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
    box-shadow: 0 7px 18px rgba(37, 99, 235, 0.35);
}

.edm-doc-download-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.45);
}

.edm-doc-download-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.25);
}

.edm-doc-download-text {
    margin-left: 6px;
}

/* Download helper text under thumbnail */
.edm-doc-download-helper {
    display: block;
    margin-top: 6px;
    margin-bottom: 12px;
    font-size: 11px;
    color: #6b7280;
}

/* Layout tweaks for list view */
.edm-docs-list .edm-doc-item {
    display: flex;
    align-items: center;
    text-align: left;
}

.edm-docs-list .edm-doc-thumb-wrap {
    margin: 0 18px 0 0;
}

.edm-docs-list .edm-doc-content {
    flex: 1;
}

.edm-docs-list .edm-doc-title {
    margin-bottom: 6px;
}

.edm-docs-list .edm-doc-download-helper {
    margin-bottom: 8px;
}

@media (max-width: 640px) {
    .edm-docs {
        gap: 16px;
    }

    .edm-docs-grid .edm-doc-item {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* PDF Viewer */
.edm-pdf-viewer {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    padding: 22px 22px 20px;
    border: 1px solid rgba(148, 163, 184, 0.55);
}

.edm-pdf-title {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #0f172a;
}

.edm-pdf-title.edm-align-center {
    text-align: center;
}

.edm-pdf-title.edm-align-right {
    text-align: right;
}

.edm-pdf-frame-wrap {
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: inset 0 0 0 1px rgba(30, 64, 175, 0.45);
}

.edm-pdf-frame {
    width: 100%;
    border: none;
    display: block;
    background: #111827;
}

.edm-pdf-fallback {
    padding: 40px 24px;
    text-align: center;
    color: #e5e7eb;
    font-size: 14px;
}

.edm-pdf-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}
