.ap-pdf-widget {
    margin: 24px 0;
}

.ap-pdf-widget[hidden] {
    display: none !important;
}

.ap-pdf-widget-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: stretch;
}

.ap-pdf-widget-placeholder,
.ap-pdf-widget-preview-hint,
.ap-pdf-widget-debug {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 1px dashed #ddd;
    border-radius: 6px;
    color: #666;
    background: #fafafa;
}

.ap-pdf-document-link {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    min-width: 280px;
    max-width: 100%;
    padding: 22px 28px;
    border: 1px solid #d5d5d5;
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.ap-pdf-document-link:hover,
.ap-pdf-document-link:focus {
    color: inherit;
    text-decoration: none;
    border-color: #6baa2c;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
    transform: translateY(-1px);
}

.ap-pdf-document-icon {
    position: relative;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    flex: 0 0 auto;
    width: 56px;
    height: 72px;
    padding-bottom: 12px;
    border: 3px solid #6baa2c;
    color: #6baa2c;
    font-weight: 700;
    font-size: 18px;
    line-height: 1;
    background: #fff;
}

.ap-pdf-document-icon::after {
    content: "";
    position: absolute;
    top: -3px;
    right: -3px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #fff 0%, #fff 48%, #dff0d0 50%, #dff0d0 100%);
    border-left: 3px solid #6baa2c;
    border-bottom: 3px solid #6baa2c;
}

.ap-pdf-document-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ap-pdf-document-title {
    font-weight: 700;
    font-size: 18px;
}

.ap-pdf-document-subtitle {
    color: #555;
    font-size: 16px;
}

@media (max-width: 767px) {
    .ap-pdf-widget-list {
        flex-direction: column;
    }

    .ap-pdf-document-link {
        width: 100%;
        min-width: 0;
    }
}
